Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to fix Cpanel Remote Mysql issue  (Read 3638 times)

0 Members and 1 Guest are viewing this topic.

Haripriya H

  • Guest
How to fix Cpanel Remote Mysql issue
« on: May 30, 2014, 12:22:38 pm »
How to fix Cpanel Remote Mysql issue having the error message: WARNING [2] mysql_connect(): OK packet 6 bytes shorter than expected, Line: 34 in file C:\inetpub\local_intranet\website_updater.php

We need to perform two steps to check this which can be done as follows:

Firstly, check the mysql remote connection after making sure that you are using the following parameters;

MySQL server : Server IP

Port : 3306

User : fill in mysql user for eg: username_test

Password : password of the mysql user.

Secondly, we need to test if mysql remote connection is working by doing the following steps:

[root@linux] #mysql -h server_ip -u my_sql_username -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 15054

Server version: 5.0.9-community MySQL Community Edition (GPL)

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> show databases;

+——————–+

| Database |

+——————–+

| information_schema |

| linux_catalogs |

+——————–+

2 rows in set (0.01 sec)

If an Error message apprears as shown below , then this can be resolved which is explained

after this:

WARNING [2] mysql_connect(): OK packet 6 bytes shorter than expected, Line: 34 in file C:\inetpub\local_intranet\website_updater.php

Steps to fix this issue:

a. vi /etc/my.cnf

b. change old-passwords = 1  to #old-passwords = 1

c. restart mysql

d.  change password (change the password of mysql user  to the same password}

e.  uncomment #old-passwords = 1

f.  restart mysql

This will fix the above mysql remote connection issue.