Its dosent matter. You will not host a server with 5000 players.
You can host db and host in same machine. Also it will be cheaper for you, rather having two different machines/
You have two options:
2. Allow connect only website to your mysql. I mean limit IP address.