0

As we know that in order to connect WP with database we should to define mysql username and password in wp-config.php, so at that point i have a question regarding security or ( some sort of connecting error ):

it is good practice using same mysql user with many databases

one thing is that i haven't seen any trouble regarding this but was thinking someday it will come :) hope you understand
well thanks in advance

1 Answer 1

0

Well it's really not good practise, but this depends on how you're accessing the other databases.

For example, I have a server that hosts 10+ different Wordpress sites.

I have two options for connecting to the databases:

  1. Use the root login in all my wp-config.php files as it's easier
  2. Create a user and logins associated with each database for each site

Number 1 is useful when I'm developing locally/on a virtual machine as the databases aren't accessible to the outside world.

Number 2 is definitely the best practise when you're running a live server with multiple databases. At most if your password does get compromised you're only exposing one database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.