SA-MP Forums Archive
Help me MYSQL - 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: Help me MYSQL (/showthread.php?tid=655882)



Help me MYSQL - nguyenthanhdanhsamp - 02.07.2018

Erro Connect MYSQL

Code pawno Gamemode
Код HTML:
mysql = mysql_connect("localhost", "root", "pubg", "");
	//mysql = mysql_connect("212.22.93.13", "rmfchgon", "rmfchgon_11188", "aStasd#fajl!...");
	if(mysql_errno(mysql)) { mysql = -1; printf("[MySQL]: Failed to connect to the database."); }
	else printf("[MySQL]: The database is successfully connected.");



Re: Help me MYSQL - Smithy - 02.07.2018

I'd remove your actual MySQL details from this topic.

Also;
mysql_connect("localhost", "root", "pubg", "");

It can't connect using these credentials. Are you sure these are valid? There is no password being entered and the DB being just pubg?


Re: Help me MYSQL - nguyenthanhdanhsamp - 02.07.2018

Quote:
Originally Posted by Smithy
Посмотреть сообщение
I'd remove your actual MySQL details from this topic.

Also;
mysql_connect("localhost", "root", "pubg", "");

It can't connect using these credentials. Are you sure these are valid? There is no password being entered and the DB being just pubg?
I have localost=127.0.0.1 and password=123123, DB=VNRP, and not working


Re: Help me MYSQL - Smithy - 02.07.2018

Have you tried logging directly into PHPMYAdmin using those credentials instead of using the server to test that they do actually work?


Re: Help me MYSQL - jasperschellekens - 02.07.2018

How is it so strange that you cant connect?

Change it to this as u didn't even enter the correct pw and db name.
Код:
mysql = mysql_connect("localhost", "root", "VNRP", "123123");
Also u have created a note of the line using the IP etc, why? I don't think that does even work. If you are on your own computer im pretty sure its localhost. I only saw things like mysql.host.com or an ip instead of localhost at host providers.