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.
MySQL Socket Error in phpMyAdmin
While accessing phpMyAdmin, you may get the following error.
#2002 - The server is not responding (or the local MySQL server’s socket is not correctly configured)
This is due to the missing socket file in the location /tmp.
The socket path which is specified in the phpMyAdmin configuration file is /tmp/mysql.sock.
$ vi /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php
cfg['Server']['socket'] = ‘/tmp/mysql.sock’;
If mysql.sock is missing in /tmp, then create a link to the mysql.sock file in /var/lib/mysql.
$ ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
There is also another fix for this issue.
1. Open the phpMyadmin config file “config.inc.php”.
vi /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php
2.Locate the line:
$cfg['Servers'][$i]['host'] = ‘localhost’;
3.Replace ‘localhost’ with ‘127.0.0.1′ and save.
$cfg['Servers'][$i]['host'] = ‘127.0.0.1′;
MySQL: got error 28 from server handler
This error means no space left on hard disk. If you get his error, you need to check all filesystems where MySQL operates.
a) Stop mysql server
# /etc/init.d/mysql stop
OR
# /etc/init.d/mysqld stop
b) Check filesystem and /tmp directories:
$ df -h
$ cd /tmp
$ df -h /tmp
c) Remove files from /tmp to free up space:
d) Look into /var/log directory and remove or compress logs file.
e) Use myisamchk command to check and repair of ISAM table:
# cd /var/lib/mysql
# myisamchk
f) Increase disk space (add new hard disk or remove unwanted softwares)
g) Start the mysql server:
# /etc/init.d/mysql start
OR
# /etc/init.d/mysqld start
How to change the storage engine to InnoDB
1.Edit the /etc/my.cnf file and look for this line:
and comment it out:
2.Add the following entry in the /etc/my.cnf file
default-storage_engine = InnoDB
3. Save the file, and restart mysql
/etc/rc.d/init.d/mysqld restart
4. You can use the following command to check the “storage engine” used in the server.
mysqladmin variables | grep storage_engine
You will see the storage engine as “InnoDB”.
# mysqladmin variables | grep storage_engine
| storage_engine | InnoDB
Reseller list missing in WHM
This article discusses how to resolve issues where the WHM reseller list has disappeared however they still exist in Apache’s configuration and the users’ directories still exist in /home
Resolutions
1)/var/cpanel/users/
/var/cpanel/users/username should have the following syntax per line “DNS=domain.com” line. If not, edit this file and change the line to DNS=domain.com
Secondly, be sure to check that the DNS zone above exists in “Edit DNS Zone” in WHM. If not, add it via “Add DNS Zone” in WHM.
2)/etc/httpd/conf/httpd.conf
Double check that there is a VirtualHost container per domain in /var/named/
3)/etc/userdomains
/etc/userdomains should have the following syntax per line “domain.com: user” where user is the reseller. If not, edit this file and change the file to match.
4)/etc/trueuserdomains
/etc/trueuserdomains should also have the following syntax per line “domain.com:user”where user is the domain owner user. If not:
mv /etc/trueuserowners /etc/trueuserowners1
/scripts/updateuserdomains