SA-MP Forums Archive
Question regarding MySQL - 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: Question regarding MySQL (/showthread.php?tid=371532)



Question regarding MySQL - DanTzi - 23.08.2012

Hello,

Is it possible to make kind of a "central MySQL database" for multiple servers, and can they be connected in same time to the database?

Thanks,
DanTzi


Re: Question regarding MySQL - Mandrakke - 23.08.2012

of course you can, MySQL accept multiple connections.


Re : Question regarding MySQL - Eony - 23.08.2012

Sure you can, multiple programs can be connected to a single MySQL database at once, simply make sure that your MySQL server allows remote connections.

Allow remove connections to your MySQL server


Re: Question regarding MySQL - VOXrr - 23.08.2012

Yup, just be careful about simultaneous writes if they're connecting to the same database.

If possible, use InnoDB instead of MyISAM.

When MyISAM performs a write, it'll lock the entire database whilst it performs it's action. Everything else will form a cue. If it's one write per minute, you should be just fine - But if you're doing multiple writes per second, it's going to be a huge performance hit.
When InnoDB performs a write, it'll only lock a single row, leaving everything else open to writing. Success.

InnoDB can be a tad more of a resource grabber at times, but it's totally worth it in these kinds of situations.


tl;dr version: Yes, but you might want to optimise it.