Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create a root password for PHPMyAdmin

Tags:

phpmyadmin

PHPMyAdmin is giving me a message saying that the user (root) does not have a password.

So, how can I create one?

like image 767
Daniel Montenegro Avatar asked Sep 01 '12 02:09

Daniel Montenegro


People also ask

How do I set a root password in MySQL?

Configuring a default root password for MySQL/MariaDB Use the following procedure to set a root password. To change the root password, type the following at the MySQL/MariaDB command prompt: ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyN3wP4ssw0rd'; flush privileges; exit; Store the new password in a secure location.

What is default password for phpMyAdmin?

Log in to phpMyAdmin by using the following credentials: Username: root. Password: The same as the application password.


2 Answers

Open phpMyAdmin and select the SQL tab. Then type this command:

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

Also change to this line in config.inc.php:

$cfg['Servers'][$i]['auth_type'] = 'cookie'; 

To make phpMyAdmin prompts for your MySQL username and password.

like image 150
flowfree Avatar answered Sep 30 '22 12:09

flowfree


To create root password in PHPMyAdmin in UI easy way, you can follow simple steps below:

  • Access phpMyAdmin with root account (no password) -> User accounts.

enter image description here

Click on root > Edit privileges

enter image description here

Then click on Change password

enter image description here

Enter your desired password -> Go

enter image description here

Logout and log-in again with new password

like image 21
SonDang Avatar answered Sep 30 '22 12:09

SonDang