If I open some database through PHPMyAdmin in Plesk CP, the following error occurs: "Non-static method PMA_Config::isHttps() should not be called statically".

Article ID: 1869 
Last Review: Oct,6 2008
Author: Bezborodova Anastasiya APPLIES TO:
  • Plesk for Linux/Unix

Symptoms

PHPMyAdmin returns the following error when you are trying to access a database:

Non-static method PMA_Config::isHttps() should not be called statically

Cause

PHPMyAdmin in Plesk accesses the database using this database users' credentials. In case if the user or password do not match to the records in 'mysql' db, the error specified above occurs.

Resolution

In order to check the user/password, you can try to establish MySQL connection from the command line on the server, for example:

~# mysql -uDB_USER -pDB_PASSWORD -D DB_NAME
ERROR 1045 (28000): Access denied for user 'USERNAME'@'localhost' (using password: YES)

Such error means that database user cannot access the database because of invalid password or insufficient permissions to connect this database.
You can reset the password and permissions for this user through Plesk interface by updating the Domains -> DOMAIN -> Databases -> DB_NAME -> DB_USER page.

If the problem remained after password reset, verify that empty mysql user does not exist and delete it in case such user exists.

mysql> select Host, User from mysql.user where User='';
+----------------------+------+
| Host                 | User |
+----------------------+------+
| yourdomain.com       |      |
| localhost            |      |
+----------------------+------+
2 rows in set (0.00 sec)

mysql> delete from mysql.user where User='';
Query OK, 2 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql>


As explained in MySQL manual at
http://dev.mysql.com/doc/refman/5.1/en/access-denied.html

A very common error is to insert a new entry with Host='%' and User='some_user', thinking that this allows you to specify localhost to connect from the same machine. The reason that this does not work is that the default privileges include an entry with Host='localhost' and User=''. Because that entry has a Host value 'localhost' that is more specific than '%', it is used in preference to the new entry when connecting from localhost! The correct procedure is to insert a second entry with Host='localhost' and User='some_user', or to delete the entry with Host='localhost' and User=''. After deleting the entry, remember to issue a FLUSH PRIVILEGES statement to reload the grant tables.
Keywords: PHPMyAdmin; access denied;


Subscription for this article changesSubscription for this article changes

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
* - required fields