如题所示的报错,可能是由于以下几个问题之一造成的:
1. MySQL数据库权限不足
2. MySQL参数不当
3. 其他。

解决方法:

如上,在/etc/my.cnf的“[mysqld]”中写:skip-grant-tables。

然后,重启MySQL:
/etc/init.d/mysql status
/etc/init.d/mysql stop
/etc/init.d/mysql start

创建执行的账户:
create user xxx@xxx identified by ‘xxx’;

对指定的账户分配足够的权限:
grant all privileges on *.* to xxx@xxx;

你也可以更改已有的用户的口令:
update mysql.user set password=password(‘xxxx’) where user=’xxx’ and host=’xxx’;

更新权限:
flush privileges;

查看当前MySQL登录的用户:
select user();

————————————
Done。

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

隐藏
变装