I install on Ubuntu LAMP with MYSQL. I try login to mysql by command mysql but there is an
Error 1045: Access denied for user ‘root’@’localhost’ (using password:
YES)
. I try use
Blockquote
sudo mysql_secure_installation
but it’s the same error
2
Answers
Follow this step
Change the password of root by mysql prompt
mysql -u root -p
update password
UPDATE mysql.user SET Password=PASSWORD(‘newpass’) WHERE User=’root’;
Edited line in the file config.inc.php with the new root password:
$cfg[‘Servers’][$i][‘password’] = ‘MyNewPass’
When you are trying to access the database connection you need to give the password aswell. which you must have set during installation.
If you don’t remember it you will have to reset the password.