Posts: 48
Threads: 10
Joined: May 2007
Reputation:
0
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.
Posts: 2,502
Threads: 26
Joined: Apr 2007
Reputation:
0
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.
Posts: 544
Threads: 120
Joined: Aug 2010
Reputation:
0
You webhost is it using cpanel?
Posts: 48
Threads: 10
Joined: May 2007
Reputation:
0
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.