banner



How To Set Phpmyadmin Username And Password

Do you want to modify a password for the root business relationship of your MySQL server? Sometimes you may desire to set a password for the 'root'@'localhost' business relationship. In this article, I evidence yous 3 possible ways to reset the countersign for your root account.

When your application is live, you have to pass both username and password in order to access the database. For accessing phpMyAdmin on a alive server, your hosting does set the credentials for you. Just on the local server, you have to set up credentials yourself. Though users rarely ready the countersign on the local machine to admission phpMyadmin, it's always a good do to do so.

That existence said, allow'due south take a await at how to set MySQL Root password. I am going to bear witness y'all 3 different ways of resetting the password.

How to Set up Root Password in phpMyAdmin

phpMyAdmin is a fantastic software built for handling your MySQL databases. Information technology simply makes developers life easy to manage the database, tables, table structures, queries, and and so on.

Using phpMyAdmin, one tin can set up the Root password in a few steps.

Go to the phpMyAdmin on the browser. Most probably yous tin access information technology using http://localhost/phpmyadmin.

Click on the 'User Accounts' from the top bar.

User Accounts

You will so see a listing of user accounts. We need the last account from the listing with the User name every bit 'root' and the Host name every bit 'localhost'. Click on the 'Edit privileges' from the Action column of this row.

Edit Privileges

On the next screen, click on the 'Modify countersign'. In the form, enter the password yous want to set and click on the 'Become'.

Change Password

Later these steps are washed, head over to your editor and open up the config.inc.php from the phpmyadmin directory. On my Windows 10 motorcar, I have XAMPP server installed and config.inc.php path is D:\xampp\phpMyAdmin\config.inc.php. Adjust the path as per your installations.

Search for $cfg['Servers'][$i]['auth_type'] in the file config.inc.php. This variable should have a 'config' value set up by default. Change this value to 'cookie' equally follows.

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

Run the URL http://localhost/phpmyadmin on the browser and this time you will be asked for entering username and password. Enter the username as 'root' and password which you set in the above steps, it will log you within the phpMyAdmin.

Keep a note you accept to utilise the same username and countersign in your database connection code for the applications.

This is the nearly efficient style of irresolute the Root countersign. Withal, there are ii other ways to set the countersign for 'root'@'localhost' business relationship.

Other Ways to Set MySQL Root Password

If you desire to effort another manner of changing a Root countersign, then commencement revert dorsum the changes made in the config.inc.php file.

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

Head over to the phpMyAdmin, click on the 'SQL' from the top bar, and run the beneath query.

Prepare PASSWORD FOR root@localhost = PASSWORD('PASSWORD_HERE');        

Supplant the placeholder with the actual value. Prepare again the 'cookie' value for the $cfg['Servers'][$i]['auth_type'] variable of your config.inc.php file and you lot are done.

The last option to reset the Root password is through the command line. For this, you again need to revert your changes of config.inc.php file.

If y'all have set up the MySQL path in your surroundings then y'all can run the MySQL queries directly in the control prompt. If the path is non set up, and so open up the concluding inside the MySQL installation directory. In my case, information technology's path is D:\xampp\mysql\bin.

In the terminal, run the beneath command:

mysqladmin -u root password PASSWORD_HERE        

Command Prompt

Subsequently this, fix the value as 'cookie' for the $cfg['Servers'][$i]['auth_type'] variable.

That'due south information technology! I hope y'all got to know how to set MySQL Root countersign using phpMyAdmin and terminal. Please share your thoughts and suggestions in the comment department below.

Related Articles

  • How to Write MySQL Commands to Export and Import Database
  • How to Run MySQL Queries through Windows Control Prompt

If you liked this article, then please subscribe to our YouTube Channel for video tutorials.

How To Set Phpmyadmin Username And Password,

Source: https://artisansweb.net/set-mysql-root-password-phpmyadmin/

Posted by: washingtoncaunthave1937.blogspot.com

0 Response to "How To Set Phpmyadmin Username And Password"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel