Where phpMyAdmin credentials come from
Your phpMyAdmin username and password are the same ones you use to connect to your MySQL database itself — phpMyAdmin is just the interface that lets you see and edit that database through a web browser. You do not create separate phpMyAdmin credentials. Instead, you find the MySQL username and password you already set up, either when you first created the database or when your hosting provider gave them to you.
The place to look depends on how you set up MySQL. If your hosting company created the database for you, the credentials are in your hosting control panel. If you installed MySQL yourself on your own server, you set the password during installation. Either way, the username is almost always root for a fresh installation, though hosting companies often create a different username tied to your account.
Key Takeaways
- phpMyAdmin uses your MySQL database username and password — they are not separate credentials you create in phpMyAdmin itself.
- Hosting control panels like cPanel, Plesk, and Bluehost store MySQL usernames and passwords in a database management section you can view anytime.
- If you installed MySQL yourself, the default username is root, and you set the password during the installation process.
- The config.inc.php file in your phpMyAdmin folder contains the username and password in plain text, but you should never share this file or its contents.
- If you have forgotten the password, you will need to reset it through your hosting control panel or by running MySQL commands on your server.
Check your hosting control panel first
If you use a hosting company like GoDaddy, Bluehost, HostGator, or any other shared hosting provider, your MySQL credentials are stored in your hosting control panel. Log in to your account on the hosting company's website, not to phpMyAdmin itself.
Look for a section called Databases, MySQL Databases, or Database Management. In cPanel (the most common control panel), this appears in the left sidebar. Click it, and you will see a list of databases you have created. Next to each database name, there is usually a username listed, or a button that says Manage or Edit. Click that button to see the username. The password is usually hidden for security, but many hosting panels have a button to reset it or show it temporarily.
If your hosting company uses Plesk instead of cPanel, log in and go to Databases in the left menu. Select the database you want to access, and the username will be displayed on the details page. Again, you may need to reset the password rather than view it.
Find credentials in the phpMyAdmin config file
If you have already logged into phpMyAdmin before and want to see what username is stored there, you can check the configuration file directly on your server. This file is called config.inc.php and lives in the phpMyAdmin folder on your web server.
To access it, use an FTP client like FileZilla or your hosting company's file manager. Connect to your server, navigate to the folder where phpMyAdmin is installed (often /public_html/phpmyadmin or /var/www/html/phpmyadmin), and open the config.inc.php file in a text editor. Look for a line that says $cfg['Servers'][1]['user'] — the value after it is your username. The password line is usually $cfg['Servers'][1]['password'].
Do not share this file with anyone, and do not post its contents online. It contains your database password in plain text, which is a security risk. This method is only for your own reference if you have forgotten the credentials.
Reset a forgotten MySQL password
If you cannot find your password and your hosting control panel does not show it, you can reset it. In cPanel, go to MySQL Databases, find your database user in the list, and click the Change Password button next to it. Enter a new password and save. The change takes effect when ready, and you can then use the new password in phpMyAdmin.
If you installed MySQL on your own Linux server and have root access to the server itself, you can reset the root password by stopping MySQL, starting it in safe mode, and running a password reset command. This requires command-line access and is more technical — contact your server administrator if you are not comfortable with the command line.
If you use Windows and installed MySQL locally, you can uninstall and reinstall MySQL, which will let you set a new root password during the installation wizard. This erases all databases, so only do this if you have backups or do not need the data.
What to do if you see a "access denied" error
If you have found your username and password but phpMyAdmin shows an "access denied" error when you try to log in, the most common cause is that the password has changed since you last used it, or you are typing it incorrectly. Passwords are case-sensitive, so check that Caps Lock is off and that you are not adding extra spaces.
The second most common cause is that the username is wrong. If your hosting company created the database for you, the username is often not root — it might be something like mysite_user or account_db. Go back to your hosting control panel and double-check the exact username listed for that database.
If the username and password are definitely correct, the database user may not have permission to access phpMyAdmin. This is rare but can happen if the user was created with very limited permissions. Contact your hosting company's support to confirm the user has the right permissions, or ask them to create a new database user for you.
Protect your credentials after you find them
Once you have your username and password, do not store them in a plain text file on your desktop or email them to yourself. If someone gains access to your computer or email, they can then access your entire database.
Instead, use a password manager like Bitwarden, 1Password, or KeePass to store them securely. These tools encrypt your passwords and require a master password to open them. Write down the master password and keep it in a physical safe place, separate from your computer.
If you share your computer with others or use a public computer, never check the Remember this password box in phpMyAdmin. Always log out when you are done, and clear your browser history if you are on a shared machine.
Frequently Asked Questions
Is the phpMyAdmin password different from my MySQL password?
No. phpMyAdmin reads the same MySQL username and password you use to connect to the database directly. If you change your MySQL password in your hosting control panel, you must use the new password the next time you log into phpMyAdmin.
What if my hosting company will not show me the password?
Most hosting companies hide the password for security but let you reset it. Go to your control panel, find the MySQL user, and click the reset or change password button. You will then set a new password that you can use when ready in phpMyAdmin.
Can I use any username and password to log into phpMyAdmin?
No. phpMyAdmin only accepts usernames and passwords that exist in your MySQL server. You cannot create a phpMyAdmin-only account. The username must be a real MySQL user, and the password must match what is stored in MySQL.
Is it safe to store my phpMyAdmin password in my browser?
No. If someone gains access to your computer, they can retrieve saved passwords from your browser. Use a dedicated password manager instead, or memorize the password if you use phpMyAdmin frequently.
What should I do if I think someone else knows my phpMyAdmin password?
Reset your MySQL password when ready through your hosting control panel. Then review your database for any unauthorized changes or new tables. If you find suspicious activity, contact your hosting company's support team and ask them to check your server logs for unauthorized access.