Fix phpMyAdmin "Access Denied" / Can't Log In
Access denied for userCannot log in to the MySQL servermysqli::real_connectA phpMyAdmin login failure is really a MySQL login failure — phpMyAdmin is just the messenger. The fix is the same as any MySQL access problem. Here's how.
Use the right MySQL user
Log in with a valid MySQL username and password — not your panel/cPanel login (unless they're the same). If denied, the credentials are wrong; reset the DB user's password. See MySQL access denied (1045).
Check the host phpMyAdmin connects to
phpMyAdmin's config.inc.php defines the MySQL host. A user granted on localhost but a config pointing at 127.0.0.1 (or a remote host) gets denied — they're treated differently in MySQL.
"Cannot log in to the MySQL server"
That specific message often means MySQL itself isn't running or isn't reachable. Confirm the service is up — see MySQL/MariaDB won't start:
systemctl status mariadb
DirectAdmin/cPanel launch phpMyAdmin pre-authenticated for a database. Use that link rather than logging in manually to avoid credential mix-ups.
phpMyAdmin login = MySQL login. Use a valid DB user, match the host (localhost vs 127.0.0.1), and confirm MySQL is running.
Managed databases, simple panel
Our web hosting includes phpMyAdmin and managed MySQL with a clean panel, on protected NVMe.
Frequently asked questions
Why can't I log into phpMyAdmin?
phpMyAdmin authenticates against MySQL, so a login failure means wrong MySQL credentials, a host mismatch (localhost vs 127.0.0.1), or MySQL being down — not a phpMyAdmin bug.
Do I use my cPanel password for phpMyAdmin?
Not necessarily — you need a MySQL database user's credentials, which may differ from your panel login. On most panels, launch phpMyAdmin from the database section to log in automatically.
What does "Cannot log in to the MySQL server" mean?
Often MySQL/MariaDB isn't running or isn't reachable at the configured host, or the credentials are wrong. Confirm the database service is up and the user/host are correct.
Related articles
Fix "500 Internal Server Error" on Your Website
A 500 error on your site? The usual causes — .htaccess, file permissions, PHP — and how to fix them.
Read fix Web HostingHow to Point a Domain to Your Server (DNS A Record)
How to point a domain at your server with an A record — and why it doesn't work instantly.
Read fix Web HostingFix Email Going to Spam (SPF, DKIM & DMARC Explained)
Mail landing in spam? Set SPF, DKIM and DMARC correctly so your email reaches the inbox.
Read fix