Question

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

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?

Thanks!

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Check out <a href=“https://www.digitalocean.com/community/articles/how-to-set-up-multiple-wordpress-sites-on-a-single-ubuntu-vps”>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.