Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 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?

like image 671
Bernd Avatar asked Mar 07 '13 13:03

Bernd


People also ask

What is the default username and password for phpMyAdmin in XAMPP?

Open phpMyAdmin in XAMPP. The phpMyAdmin interface. If you're asked to log in, use the username “root” and enter your root password. If you haven't set one yet, you can leave it blank.

Is XAMPP and phpMyAdmin same?

XAMPP is an open source package that is widely used for PHP development. XAMPP contains MariaDB, PHP, and Perl; it provides a graphical interface for SQL (phpMyAdmin), making it easy to maintain data in a relational database. If you have not installed XAMPP, please refer to XAMPP-setup to install and set up XAMPP.

What is my username and password for MySQL in phpMyAdmin?

Show activity on this post. You can access that database with the user/password used to login on the phpMyAdmin. You can also create new users (if you have permission to) under the tab Privileges > Add new User. Here you can create pairs of user-database with the same name and auto-permission-granting.


1 Answers

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.

like image 185
Zim84 Avatar answered Sep 25 '22 02:09

Zim84