• gman243

    (@gman243)


    I’ve been installing about 10 WordPress sites per MySQL database. Each database has its own MySQL username and password that all 10 sites share to connect to MySQL. Each WordPress site is stand-alone with its own table prefix. My question then is if having 10 WordPress sites using the same MySQL user account will create any issues. Or really if anything about this setup seems like it would create problems.

    Recently we’ve been having some of our sites show a “Error establishing connection to database” error page (that’s all the page says) for 15-30 minutes before it comes back. I’ve noticed that it only happens to 1-2 of the databases I’ve setup and not all of them. I then tried to login to PHPMyAdmin with the shared MySQL user for that database and it would not work. I’m assuming that it’s an overload on the MySQL user account and not the database itself, however my inexperience does not lend itself well to proving this assumption.

    I am going to start creating separate MySQL users for each account anyway but I’m wondering what people think of this setup and if maybe I have too many sites in a database/using the same user information.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Justin

    (@jgwpk)

    It should not matter how many sites you run in your MySQL setup. One thing does stick out. you said that all your sites are using the same connection credentials but different prefix. With this set up like so, you are increasing your changes of being hacked 10 fold (Crack one, Crack all Deal).

    You are on the right track to setting each one up with its own user. I would also only give those user the right to the database it needs. For example, do not give each user access to % or ALL databases

    Thread Starter gman243

    (@gman243)

    Justin,

    What you say about being hacked has always been a concern of mine which is why I only do up to 10 installs in one database (they are backed up frequently). However, even if I do setup different MySQL user accounts for each site won’t those accounts still have permission to access the entire database anyway (since WordPress requires full access privileges for MySQL user accounts)? It seems to me that there’s no easy way to get around that if you’re doing multiple installs to one database (that I can think of). For example, a person could FTP into their site, download the WP-CONFIG.PHP, grab the credentials and access the whole database.

    Also I ran into a MySQL article (http://dev.mysql.com/doc/refman/5.0/en/user-resources.html) that appears to explain an option for limiting the amount of connections a MySQL user account can amass per hour. This sounds like it could be the problem I am running into but I can’t be entirely certain.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Same MySQL DB User or New One for Each WordPress Install’ is closed to new replies.