How do you setup a MySQL database to use with a WordPress installation?

  • Posted October 26, 2013

I have a “Wordpress on Ubuntu 12.10” droplet (512MB Ram 20GB SSD Disk) and I would like to setup additional WordPress installations. But I first need to know how to setup a MySQL database under such a scenario.

What are the exact steps to setup a MySQL database to use with a WordPress installation using DigitalOcean?



Hello! I recently discovered this video and that may be interesting. In case my experience is useful, I started creating my website with this free online course Here they explain how to create a database in a simple way

I hope that helps!

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Check out <a href=“”>How To Set Up Multiple WordPress Sites on a Single Ubuntu VPS</a>.

Thank you very much “dvikan”! I sincerely appreciate it. <br> <br>When you say “First make a password”, are you referring to the password that I would type in when I do this “ssh root@IP-ADDRESS-HERE”? If so, I already have a password for that. Should I just go straight to: mysql -u root mysql -p <br> <br>And just to use my own data here, would this be right: <br> <br>mysql -u root mysql -p <br>CREATE DATABASE wpdb01; <br>CREATE USER ‘wpdb01’@‘localhost’ IDENTIFIED BY ‘blahblah’; <br>GRANT ALL PRIVILEGES ON wpdb01.* TO ‘wpdb01’@‘localhost’; <br>FLUSH PRIVILEGES; <br> <br>I have the username and database as the same name here and the password as “blahblah”. <br> <br>Thanks again!

First make a password; <br>openssl rand -base64 16 <br> <br>Then create database and user and privileges. Then flush privileges. <br> <br>mysql -u root mysql -p <br>CREATE DATABASE ideside; <br>CREATE USER ‘ideuser’@‘localhost’ IDENTIFIED BY ‘yourpassword’; <br>GRANT ALL PRIVILEGES ON ideside.* TO ‘ideuser’@‘localhost’; <br>FLUSH PRIVILEGES; <br> <br>Obviously replace with your own data.