Could not connect to the MariaDB - MySQL database

You will want to verify you are using the correct database name, username and password.

All databases and username will have your username appended to the beginning to prevent your information from being overwritten by other users using the same names. Because of this you will also want to keep database and usernames short as some applications have problems with longer names.

Keep passwords simple to alpha-numeric. Don't include dots and special characters as some apps have problems with this.

Make sure you have added the username to the database and the correct permissions were selected before adding. This is typically the "all" setting.

Hostname will always be "localhost" unless you are trying to connect to the database remotely using an application such as MySQL Navigator.

When connecting remotely MariaDB / MySQL is accessible via the standard port of 3306.


Share this page:


Was this article useful? Have any suggestions or improvements to the information?

Also Read

When trying to connect to MariaDB or MySQL you receive error 2003 Cannot connect to MySQL on x.x.x.x on port 3306 (10060)

Please ensure you have added the remote IP to the allow list in your hosting control panel...

I am having problems with a script I wrote.

PHP suexec is running on all of our shared servers. If you are running code that is insecure or...

How can I find my MariaDB - MySQL version?

Login to cPanel In the "Stats" section on the left, locate the row labeled "MariaDB or MySQL...

Register Globals On

If you run a script that requires php "register globals on" create a php.ini file and include the...

Learn MariaDB

MariaDB is a drop-in replacement for MySQL. The lead developer and founder of MySQL, Michael...