External MySQL Server - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: External MySQL Server (
/showthread.php?tid=222457)
External MySQL Server -
Dmac_91 - 07.02.2011
Hey all, just wondering if SA-MP can connect to a external MySQL Database as my host does not provide them, but i have a web host that does.
If they do, can someone explain how it's set up, or post a link to a tutorial for it.
Thanks.
Re: External MySQL Server -
JaTochNietDan - 07.02.2011
It should be the same process as any MySQL server provided the webhost allows remote connections to the MySQL server. It's the same as connecting to your remote server, just create a database on it and then use the login details in the script with the mysql_connect function.
Although you should remember that connecting to an external MySQL server will probably be too slow for accounts and whatnot in SA-MP. Even when running threaded queries, the server won't hang but the players will have to wait for noticeably extended times for the queries to process. The latency between the external server containing the MySQL database and the server containing the SA-MP server is key to the situation, but even if they are very close, there will be a noticeable impact on performance.
Re: External MySQL Server -
Robert_Crawford - 07.02.2011
You webhost is it using cpanel?
Re: External MySQL Server -
Dmac_91 - 07.02.2011
Yes it is, and never mind it's all good, i just noticed that my SA-MP host does in fact provide MySQL Databases. Thanks for the replies.