这两天升级MYSQL后,当访问系统权限表时,出警告,说需要使用mysql_fix_privilege_tables来升级。查了一下网上的信息,有很多人都在问这个脚本文件在哪里啊?等等。其实这个脚本本身就是命令了。可以直接执行。
  这个命令默认使用root用户,但是有很多系统root帐号已经被删除了。就要使用参数了。具体的如下:
引用
mysql_fix_privilege_tables --user=aaa --verbose --password=123


  我不知道别人的能不能成功,总之我运行上面的命令总是报错。
引用
This script updates all the mysql privilege tables to be usable by
the current version of MySQL

Got a failure from command:
cat /usr/local/share/mysql/mysql_fix_privilege_tables.sql | /usr/local/bin/mysql --no-defaults --force --user=root --host=localhost --database=mysql
Please check the above output and try again.

Running the script with the --verbose option may give you some information
of what went wrong.

If you get an 'Access denied' error, you should run this script again and
give the MySQL root user password as an argument with the --password= option


  后来研究了一下手册,只要用下面的命令就可以轻松搞定。还让我浪费2小时。希望大家以后不会犯我同样的错误了。
引用
mysql_upgrade --user=aaa --password

  ArthurXF倾情奉献,希望大家多多支持!

现在ArthurXF本人正在搞PHP等技术培训,如果想学习的人可以跟我联系。另外培训的招生简章在这个网址,想了解的可以去看看。
PHP培训招生简章
MySQL | 评论(0) | 引用(0) | 阅读(5973)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]