Problem with connecting to the mysql DB
#1

new MySQL:g_Sql, error;
g_Sql = mysql_connect(mysql_host, mysql_user, mysql_database, mysql_password);
error = mysql_errno();
if (!error) SendClientMessage(playerid, COLOR_RED, "Successfully connected to the database.");
else
{
format(string, sizeof(string), "Failed to connect to the database. Error: %d", error);
SendClientMessage(playerid, COLOR_RED, string);
}
i always get error : 1045
mysql_host, mysql_user, mysql_database, mysql_password are correct
Reply
#2

https://sampwiki.blast.hk/wiki/MySQL/R40#mysql_connect

3rd parameter is the password and 4th the database in R40+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)