MYSQL error help
#5

Hey I've taken your code and tried it in the below format which seems to work, could you possibly try this?
Код:
	new MySQLOpt:options_id = mysql_init_options();
	mysql_set_option(options_id, AUTO_RECONNECT, false);

	DBConnect = mysql_connect((MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB, options_id);
	if(mysql_errno(DBConnect ) != 0 || DBConnect == MYSQL_INVALID_HANDLE)
	{
	    print("\n----------------------------------------------------");
		print("[ERROR] Cannot establish connection to MySQL database!");
		printf("[MYSQL] ERROR CODE: %d", mysql_errno(DBConnect ));
		print("----------------------------------------------------");
	}
	else
	{
	    print("[MYSQL] Connection to MySQL database established successfully!");
	}
Reply


Messages In This Thread
MYSQL error help - by GeorgeMcReary - 06.12.2017, 18:11
Re: MYSQL error help - by GeorgeMcReary - 07.12.2017, 15:22
Re: MYSQL error help - by GeorgeMcReary - 08.12.2017, 18:51
Re: MYSQL error help - by GeorgeMcReary - 10.12.2017, 05:47
Re: MYSQL error help - by MEW273 - 10.12.2017, 06:14
Re: MYSQL error help - by GTLS - 10.12.2017, 06:22

Forum Jump:


Users browsing this thread: 1 Guest(s)