0

Not able to create,drop database from phpmyadmin or mysql command line. 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.

Please advice.

mysql>show grants;

 +--------------+
 | 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 |

+-----------------------------------------------+

Akhil Thayyil
  • 8,985
  • 6
  • 33
  • 47
Mohd Bashir
  • 929
  • 1
  • 7
  • 17

1 Answers1

0

Finally i solved issue it to uninstall MYSQL and also delete the Mysql folder.

 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
Mohd Bashir
  • 929
  • 1
  • 7
  • 17