Is it a good idea to create a password and make your password secure for your Wordpress database when uploading the database to a third-party web host (going live instead of hosting on localhost) instead of root and no password? :


u. root p. 'no password'


u. username p. password

Does it make your database more secure and still accessible to your new third-party host?

  • If the database is exposed to the internet, you could be able to use something like mysql -u root -h yoursite.com to connect to your database and create tables, modify data, or just delete everything, anybody would be able to do it
    – Tom J Nowell
    May 28, 2019 at 15:33

1 Answer 1


The short answer is yes. Having a secure username and password is paramount to keeping your site secure.

  • But, having a secure password for the database, (and the admin to the site) right?
    – West
    May 28, 2019 at 15:17
  • @Joseph yes, what's to stop somebody from just connecting to your database directly and making changes? The only time you're ok setting a user/password to something simple is if you want it to be hacked or accessed/changed by the general public
    – Tom J Nowell
    May 28, 2019 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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