Some of the main errors that the users usually get while working with MySQL are mentioned below:

1) If a user is getting any of the following error in the php myadmin
——————————————————————–
Error: mysql_fetch_array (): supplied argument is not a valid MySQL result resource in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/dbi/mysql.dbi.lib.php on line 118 anxiety_bvlt1
Solution –> The Database Name: anxiety_bvlt1

a] You have to first check the ownership or the permissions of that perticular database anxiety_bvlt1 in /var/lib/mysql. The ownership should be mysql.mysql and the permission of the folder anxiety_bvlt1 should be 700.
b] The /tmp partition on the server should not be full.

2) Error: You have exceeded the maximum allowed connections.
—————————————————————
a] You must use mysql_connect() instead of mysql_pconnect() as mysql_pconnect() creates persistent connections even when not required causing that error to show up. Please replace mysql_connect() instead of mysql_pconnect() and that will fix your issue.
b] Restart the mysql service on the server.

3) Error: Unable to connect to database ! MySQL said: Access denied for user: ‘[email protected]’ (Using password: YES)
—————————————————————————————————————-
Find the file that has mysql connections set for the installed software. Generally it is a file named config.php or config.inc.php or db.php.
The configuration should be as follows-
$CONFIG[‘dbserver’] = ‘localhost’; // Your database server
$CONFIG[‘dbuser’] = ‘rads_copp1’; // Your mysql username prefixed with cpanel username
$CONFIG[‘dbpass’] = ‘mRPlqjnrc9bC’; // Your mysql password
$CONFIG[‘dbname’] = ‘rads_copp1’; // Your mysql database name prefixed with cpanel username

In case the above settings are correct then try resetting the password of the MySQL user from root whm > SQL mysql > “Change a User or Database Password”.

4) Accessing the Database remotely
———————————–
a] Use the following settings –
Server Name = IP of the server or domain name
Username = Mysql username
Password = Mysql password
Database = Database name

b] Add ‘%’ sign (without quotes) in cpanel > mysql > access hosts.