Unable to access MySQL from phpMyAdmin after setting root password in EasyPHP {WAMP}

After a successful installation at the initial start of MySQL, the page suggested that I set up a ROOT password for security.

When setting a password, I can no longer access MySQL. Error:

1045 - Access denied for user 'root'@'localhost' (using password: NO) 

I looked on the network and tried the following parameters in config.inc.php from the phpmyadmin file:

  • Set authentication to "http" so it asks for username and password

     /* Authentication type */ $cfg['Servers'][$i]['auth_type'] = 'http'; 
  • Set the correct password in the configuration file

     $cfg['Servers'][$i]['password'] = 'myPwd'; 

None of them worked.

Can anyone suggest a workaround for accessing MySQL? I did not fuss about the fact that I can’t use the root account, but I would like to use a different username in the database CRUD.

+1
source share
1 answer

here is my phpmyadmin config.inc.php file:

 <?php $i = 0; $i++; $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['extension'] = 'mysql'; $cfg['Servers'][$i]['AllowNoPassword'] = false; ?> 

This should be sufficient if Apache / PHP is running on the same machine as MySQL. You will then be asked to enter your username and password. Enter the root and password that you set.

+3
source

Source: https://habr.com/ru/post/1346664/


All Articles