php/mySQL on XAMPP: password for phpMyAdmin and mysql_connect different?

171,370

if you open localhost/phpmyadmin you will find a tab called "User accounts". There you can define all your users that can access the mysql database, set their rights and even limit from where they can connect.

Share:
171,370

Related videos on Youtube

Bernd
Author by

Bernd

Updated on July 09, 2022

Comments

  • Bernd
    Bernd almost 2 years

    I am running phpMyAdmin and MySQL on XAMPP for Windows.

    I am accessing the MySQL database in two ways. First, via localhost/phpmyadmin, and second, via a connection.php file (with mysql_connect('localhost','user','password') which is used by other php files for a website on the server.

    Both for the phpMyAdmin login and the mysql_connect I am using the root user. I know I should not be using root and that it is a security issue. But the passwords differ! I have set the password for the phpMyAdmin access via localhost/security, but I can't figure how to change the password required for the mysql_connect.

    I thought it would be the same but apparently it is not. How do I change the root password through phpMyAdmin?

  • Bernd
    Bernd about 11 years
    That did it! Thanks for the prompt reply!
  • wkille
    wkille over 2 years
    In phpmyadmin you have to hit the home icon in the top left in order to see the user accounts tab. I used this method to change the root user's pw and then got access denied when trying to use phpmyadmin. Solution was to also update the pw in C:\xampp\phpMyAdmin\config.inc.php too.