[英]Mysql showing error on console/phpmyadmin : ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'test123'
Not able to create,drop database from phpmyadmin or mysql command line. 无法从phpmyadmin或mysql命令行创建,删除数据库。 It showing error:
显示错误:
"ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'test123'"
After googling i found that to grant the permission to user using the command: 谷歌搜索后,我发现使用命令向用户授予权限:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost';
FLUSH PRIVILEGES;
But it also giving the error as mentioned above. 但是它也给出了如上所述的错误。
I have also uninstall and install the mysql and phpmyadmin again in the system but still getting same error's. 我也已经在系统中再次卸载并安装了mysql和phpmyadmin,但是仍然出现相同的错误。
Please advice. 请指教。
mysql>show grants; mysql>显示授权;
+--------------+
| Grants for root@localhost |
+------------------------------------+
| GRANT USAGE ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD <secret> |
| GRANT ALL PRIVILEGES ON `oe_school`.* TO 'root'@'localhost' WITH GRANT OPTION |
+-----------------------------------------------+ + ----------------------------------------------- +
Finally i solved issue it to uninstall MYSQL and also delete the Mysql folder. 最后,我解决了将其卸载MYSQL并删除Mysql文件夹的问题。
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -rf /var/lib/mysql
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.