How can I hide information_schema database from phpMyAdmin?
By default, phpMyAdmin shows all databases available to a user. So, in addition to the databases that belong to the user, the information_schema database is also visible to them.
To hide the information_schema database from phpMyAdmin on a particular MySQL logical server, add the following line to the phpMyAdmin config.inc.php file:
$cfg['Servers'][$i]['hide_db'] = ‘information_schema’;
Please note that this affects only phpMyAdmin, and users will still be able to use the information_schema database from other applications (for example, from the mysql command-line client).
How do I import a Database using PhpMyAdmin in Cpanel
To import we will need the file in .sql format, not compressed .zip or .tar.gz file.
Log into your CPanel and find the link for PhpMyAdmin.
Once in PhpMyAdmin you will see on the left side a drop down of the databases, select the database you would like to import to.
This will create some tabs at the top of the screen, click on SQL.
After clicking on SQL you will see a Text Box area and a file upload option.
Click browse on the file upload option and find your .sql file
After you have selected the file click GO and it will import your database to the server.
If we get an error given below while accessing phpMyAdmin.
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.
There can be error in writing session files. Either the owner do not have ‘write’ permission or the owner is different.
Solution
Normally tmp directories are used to dump sessions. And phpMyAdmin has its own tmp folder. Check the permission and ownership of this folder. Change it to the following
Location : /var/cpanel/userhomes/cpanel-phpmyadmin
cd /var/cpanel/userhomes/cpanel-phpmyadmin
1)Permission of tmp must be 700
2)Ownership must be cpanel-phpmyadmin
chown cpanel-phpmyadmin: -R *
The output should look similar to as given below
ll /var/cpanel/userhomes/cpanel-phpmyadmin/
total 16
drwx–x–x 4 cpanel-phpmyadmin cpanel-phpmyadmin 4096 Mar 10 23:56 ./
drwx–x–x 5 root root 4096 Mar 10 23:53 ../
drwxr-x— 2 cpanel-phpmyadmin cpanel-phpmyadmin 4096 Mar 10 23:53 mail/
drwx—— 2 cpanel-phpmyadmin cpanel-phpmyadmin 4096 Mar 10 23:56 tmp/
Error when try to use PHPMyAdmin in the Plesk CP
Sometimes you might get the following error when try to use PHPMyAdmin in Plesk CP:
“#1045 - Access denied for user ‘pma_xxxxxxx’@'localhost’ (using password: YES)”
You can use the following to fix the issue:
Make sure Plesk PHPMyAdmin user exists in mysql.user table and has right password and privileges. User name and password can be found in /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/config.inc.php file.
# cd /usr/local/psa/admin
# grep controluser htdocs/domains/databases/phpMyAdmin/config.inc.php
$cfg['Servers'][$i]['controluser'] = ‘USER’;
# grep controlpass htdocs/domains/databases/phpMyAdmin/config.inc.php
$cfg['Servers'][$i]['controlpass'] = ‘PASSWORD’;
# grep pmadb htdocs/domains/databases/phpMyAdmin/config.inc.php
$cfg['Servers'][$i]['pmadb'] = ‘DATABASE’;
Try to login as this user into MySQL from the command line. If the password doesn’t match, update mysql.user table and set ‘PASSWORD’ password for ‘USER’. If such user doesn’t exist in Mysql, create it with commands like:
# mysql -uadmin -p`cat /etc/psa/.psa.shadow`
mysql> use mysql;
mysql> insert into user values (’localhost’,'USER’,password(’PASSWORD’),’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',’N',”,”,”,”,0,0,0);
mysql> INSERT INTO `db` VALUES(’localhost’,'DATABASE’,'USER’,'Y’,'Y’,'Y’,'Y’,'N’,'N’,'N’,'N’,'N’,'N’,'N’,'N’);
mysql> flush privileges;
Replace USER, PASSWORD and DATABASE with the right values from config.inc.php.
Warning message in PhpMyAdmin after upgrading MySQL version to 5 In cPanel server.
In cPanel server after upgrading MySQL version to 5, PhpMyAdmin shows a warning message as given below
Your PHP MySQL library version 4.1.22 differs from your MySQL server version 5.0.45
CPanel’s internal PHP is not compiled with MySQL 5. That is why you are facing this issue. In order to fix this, perform the following steps.
1) Run the script /scripts/makecpphp
2) Copy the PHP binary inside /var/cpanel/3rdparty//bin/ to /usr/local/cpanel/3rdparty/bin/
That will fix the problem.