Topic: SQL connection error
I copied the database and the source code from my working server to my localhost (xampp) but unexpectedly, it still give me the following error:
mysql_connect(): MySQL server has gone away in file: C:\xampp\htdocs\fa\includes\db\connect_db.inc at line 28
mysql_connect(): Error while reading greeting packet. PID=7496 in file: C:\xampp\htdocs\fa\includes\db\connect_db.inc at line 28
mysql_select_db() expects parameter 2 to be resource, boolean given in file: C:\xampp\htdocs\fa\includes\db\connect_db.inc at line 29
mysql_query() expects parameter 2 to be resource, boolean given in file: C:\xampp\htdocs\fa\includes\db\connect_db.inc at line 53
mysql_errno() expects parameter 1 to be resource, boolean given in file: C:\xampp\htdocs\fa\includes\db\connect_db.inc at line 147
mysql_num_rows() expects parameter 1 to be resource, null given in file: C:\xampp\htdocs\fa\includes\db\connect_db.inc at line 107
But when i tried to deploy to my local wamp server, it work alright but it will show me :
mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in file: C:\wamp64\www\fa\includes\db\connect_db.inc at line 27
and when change mysql to mysqli, it will show this:
mysql_connect(): MySQL server has gone away in file: C:\xampp\htdocs\fa\includes\db\connect_db.inc at line 28
mysql_connect(): Error while reading greeting packet. PID=7496 in file: C:\xampp\htdocs\fa\includes\db\connect_db.inc at line 28
mysql_select_db() expects parameter 2 to be resource, boolean given in file: C:\xampp\htdocs\fa\includes\db\connect_db.inc at line 29
mysql_query() expects parameter 2 to be resource, boolean given in file: C:\xampp\htdocs\fa\includes\db\connect_db.inc at line 53
mysql_errno() expects parameter 1 to be resource, boolean given in file: C:\xampp\htdocs\fa\includes\db\connect_db.inc at line 147
mysql_num_rows() expects parameter 1 to be resource, null given in file: C:\xampp\htdocs\fa\includes\db\connect_db.inc at line 107
Please help