view raw
Bernd Bernd - 1 year ago 36
PHP Question

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

I am running phpMyAdmin and MySQL on XAMPP for Windows.

I am accessing the MySQL database in two ways. First, via

, and second, via a
file (with
which is used by other php files for a website on the server.

Both for the phpMyAdmin login and the
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
, but I can't figure how to change the password required for the

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


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