Report this

What is the reason for this report?

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

Posted on 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?

Thanks!



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!

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.

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.

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>.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.