Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
64
rated 0 times [  64] [ 0]  / answers: 1 / hits: 749652  / 3 Years ago, thu, september 30, 2021, 2:04:18

I've set up mysql and phpmyadmin and chose not to set a password when installing hoping that once set up i could login with root and no password but i get the following error from phpmyadmin:



Login without a password is forbidden by configuration (see AllowNoPassword)


I have previously moved the phpmyadmin folder to /var/www/



I have tried changing the following line



$cfg['Servers'][$i]['AllowNoPassword'] = false;


to



$cfg['Servers'][$i]['AllowNoPassword'] = true;


but still had no success, so i am wondering is there a way i can change the root passwords for both so i can access phpmyadmin and create databases.


More From » password

 Answers
1

You can change the mysql root password by logging in to the database directly (mysql -h your_host -u root) then run



SET PASSWORD FOR root@localhost = PASSWORD('yourpassword');


phpmyadmin should use that password so not quite sure what you mean by "for both".



Make sure to set the new password into phpmyadmin's config.inc.php too, at line

$cfg['Servers'][$i]['password'] = 'yourpassword';
Otherwise, phpmyadmin may not work, echoing



Access denied for user 'user'@'localhost' (using password: YES)

[#39486] Thursday, September 30, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
peratingcit

Total Points: 253
Total Questions: 122
Total Answers: 94

Location: Botswana
Member since Sat, Jan 7, 2023
1 Year ago
;