Hello,
My webserver is getting alot of CPU load with mysql.
I was wondering, how can i host mysql on a seperate server?
index_dl.cgi is already using a lot, so i'd like to put mysql on a seperate dedicated server.
XFileSharing Pro - How to host database on seperate server from Web Server?
Setting up MySQL on another host is rather easy.
Basically install it like you would on any other machine except for one thing. And that is account privileges require a different setting, by default only localhost can access MySQL so when creating a new user for MySQL make sure that the user can be accessed from another server.
This is a good tutorial on it:
http://www.cyberciti.biz/tips/how-do-i- ... erver.html
You need to bind MySQL to your databases IP address rather than localhost.
Disable skip-networking by commenting it (#)
Grant access to a MySQL user along with the IP of your main server
Or you can use an asterisk (*) which means any IP
You may not need to do Step 7, go to Step 8 and see if you can connect from your main server to the database server.
Basically install it like you would on any other machine except for one thing. And that is account privileges require a different setting, by default only localhost can access MySQL so when creating a new user for MySQL make sure that the user can be accessed from another server.
This is a good tutorial on it:
http://www.cyberciti.biz/tips/how-do-i- ... erver.html
You need to bind MySQL to your databases IP address rather than localhost.
Disable skip-networking by commenting it (#)
Grant access to a MySQL user along with the IP of your main server
Or you can use an asterisk (*) which means any IP
You may not need to do Step 7, go to Step 8 and see if you can connect from your main server to the database server.
Both are very helpful replies, thanks a lot guys! 
Also, would the server specs of the Database Server effect the speed of my Main Web Server? for example, when I navigate in between pages and etc I have some lag (unless my computer is just messing with me)
What specs should I concentrate on when looking into building a server for mysql?
SSD, RAM, GHZ?

Also, would the server specs of the Database Server effect the speed of my Main Web Server? for example, when I navigate in between pages and etc I have some lag (unless my computer is just messing with me)
What specs should I concentrate on when looking into building a server for mysql?
SSD, RAM, GHZ?
You should use Mysqltuner first to see if you can optimize what you currently have.
But for a separate system I'd try and get as much of the database buffered (cached) in the RAM as possible so have more RAM than the size of your database.
Then CPU and HDD, or even SSDs; low latency and high speed which are perfect for this. CPU speed is more important than the number of cores.
But for a separate system I'd try and get as much of the database buffered (cached) in the RAM as possible so have more RAM than the size of your database.
Then CPU and HDD, or even SSDs; low latency and high speed which are perfect for this. CPU speed is more important than the number of cores.