-1

I set a password for the user root manually in the phpmyadmin, and suddenly the mysql database disappeared from the list. When I use the control console, the root user can connect without a password, but the command line show database doesn't display the mysql database.

b4hand
  • 9,550
  • 4
  • 44
  • 49
java2dev
  • 105
  • 1
  • 11
  • 1
    You probably have the wrong permissions for the root user on the host you've logged in from. Try to login from the localhost if you can and see http://en.kioskea.net/faq/673-phpmyadmin-access-denied-for-user-root-localhost – Neil Smithline May 21 '15 at 16:42
  • I still have the same issue. When I use the mysql console, I can connect on it as root without password but I have the access denied to the mysql database. Via phpMyadmin I don't have the users part to do some updates or changes on tables . the unic DB I can see in phpmyadmin is information_schema. – java2dev May 21 '15 at 22:15
  • In phpMyAdmin on the home page, do you see "User: root@localhost" ? Because there can be many "root" users (each related to one host definition). – Marc Delisle May 22 '15 at 12:36
  • @Marc yes I can see it at right. – java2dev May 22 '15 at 15:04
  • 1
    Well I agree with @NeilSmithline that your root@localhost user lacks privileges. If you control your MySQL server, see this hint: http://docs.phpmyadmin.net/en/latest/faq.html?highlight=root%20password#i-have-lost-my-mysql-root-password-what-can-i-do – Marc Delisle May 22 '15 at 15:27
  • @Marc yes but it doesn't work, when I use the console and want to update de privileges for root I'have this error message : ERROR 1045 (28000): Access denied for user ''@'localhost' (using password: NO) or ERROR 1227 (42000): Access denied; you need (at least one of) the RELOAD privileges for this operation. – java2dev May 22 '15 at 17:51
  • @java2dev If you have followed the hint and restarted the MySQL server without security, you won't have an Access denied message. – Marc Delisle May 23 '15 at 10:28
  • possible duplicate of [Resetting MySQL root password](http://stackoverflow.com/questions/10338015/resetting-mysql-root-password) – Isaac Bennetch Jun 13 '15 at 22:57

2 Answers2

1

If you control your MySQL server, you can temporarily restart it without security. See http://docs.phpmyadmin.net/en/latest/faq.html?highlight=root%20password#i-have-lost-my-mysql-root-password-what-can-i-do

Marc Delisle
  • 8,879
  • 3
  • 29
  • 29
0

I've resolved it after 3 weeks ooof.

  1. Shutdown the mysql service
  2. Open the my.ini file
  3. You have to edit it where is [mysqld] and put skip-grant-tables
  4. Save the file and restart the service.
java2dev
  • 105
  • 1
  • 11
  • 1
    Well, you followed my advice giving in the comments above. Please mark the below answer as the correct answer. Note that this is a temporary solution while you adjust your password and/or privileges. – Marc Delisle May 23 '15 at 10:34
  • @Marc My issue was the password put for all privilege users. Now I've gave the password only for "root@localhost", and the same one in config.inc.php. – java2dev May 25 '15 at 14:58