SA-MP Forums Archive
How to connect MySQL server to site - 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: How to connect MySQL server to site (/showthread.php?tid=495328)



How to connect MySQL server to site - Warm - 16.02.2014

Hello.
I have a problem, i can't connect my MySQL server to a website with statistics. I completed db, user, etc but don't work, i get
Код:
1045: Access denied for user 'domain_baza'@'localhost' (using password: YES)
I have write the password and don't work ...


Re: How to connect MySQL server to site - Vince - 16.02.2014

Are your SA-MP server and website on the same box?


Re: How to connect MySQL server to site - Warm - 16.02.2014

No, for domain i have a webhost and databes is from server host provider...


Re: How to connect MySQL server to site - Vince - 16.02.2014

Well then, evidently it won't work. You need to specify the IP of your server. In this case 'localhost' refers to the webserver, not your SA-MP server.


Re: How to connect MySQL server to site - Warm - 17.02.2014

Don't work ... i set like that :

Код:
$hostname = '46.102.253.130';        // Your MySQL hostname. Usualy named as 'localhost', so you're NOT necessary to change this even this script has already online on the internet.
$dbname   = 'host_baza'; // Your database name.
$username = 'host_baza';             // Your database username.
$password = 'password';                 // Your database password. If your database has no password, leave it empty.
at hostname i put the ip of webhost and "host_baza" is database from hosting provider ...


Re: How to connect MySQL server to site - Warm - 17.02.2014

No one know ?