MySQL failed to connect - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL failed to connect (
/showthread.php?tid=627434)
MySQL failed to connect -
AndreiWow - 28.01.2017
I made the topic in another place because I couldn't post here, but now I can.
I filled everything okay and it fails to connect, here is the other topic with more information:
https://sampforum.blast.hk/showthread.php?tid=627425
Re: MySQL failed to connect -
DerickClark - 28.01.2017
Did you create the database named delceaga_samp in phpadmin?
show pictures of your phpadmin database
Re: MySQL failed to connect -
AndreiWow - 28.01.2017
Quote:
Originally Posted by DerickClark
Did you create the database named delceaga_samp in phpadmin?
show pictures of your phpadmin database
|
I will... after the host company gets back online.. looks like it is down right now, strange, it never was down before.
Re: MySQL failed to connect -
DerickClark - 28.01.2017
Quote:
Originally Posted by AndreiWow
I will... after the host company gets back online.. looks like it is down right now, strange, it never was down before.
|
That's maybe the problem is
Re: MySQL failed to connect -
AndreiWow - 28.01.2017
Here, it is perfectly working the host now but it still fails to connect, I even created another admin...
http://imgur.com/a/Lsurj
Re: MySQL failed to connect -
DerickClark - 28.01.2017
Quote:
Originally Posted by AndreiWow
Here, it is perfectly working the host now but it still fails to connect, I even created another admin...
http://imgur.com/a/Lsurj
|
Not sure this maybe the problem
Код:
#define SQL_HOST "193.84.64.208"
#define SQL_USER "delceaga_samp"
Try
Re: MySQL failed to connect -
AndreiWow - 28.01.2017
#EDIT
I MADE IT WORK WITH THIS
Код:
MHandle = mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);
if(MHandle)
{
printf("[MYSQL]: Connection Success to database: %s !", SQL_DB);
mysql_query("CREATE TABLE IF NOT EXISTS `players`(`id` int(11) NOT NULL auto_increment PRIMARY KEY,`Username` varchar(30) NOT NULL,`Password` varchar(50) NOT NULL,`Money` int(10) NOT NULL default '0')");
}
else
{
print("[MYSQL]: Failed to connect with using Following Informations: ");
printf(" Host: %s | User: %s | Password: ****** | Database: %s", SQL_HOST, SQL_USER, SQL_DB);
}