In sequel to Episode 3 "Wordpress One-click Install and Grabbing A Free Domain Name," we'll be taking a look into MySQL and installing PHPMyAdmin for GUI management.
Let's take a quick look into the database behind your Wordpress installation.
First, you'll need your MySQL password:
Then, you'll login to the MySQL console via:
mysql -u root -p
Notice the word "root." That is the username for you MySQL login. If you in the future you want to login with another username, be sure to change "root" to the valid username. It's always a good idea to make the root password extremely strong and then create another MySQL user for your applications to use. This helps as a precaution to malicious users getting access to your entire database structure.
Once inside MySQL, you can display all the databases via:
You can create a database using the "create database ..." command. For example:
CREATE DATABASE sites_wp;
Notice that the words "create database" are in all upper case. This is just a best practice that helps you differentiate between the commands and the names of objects in the database.
Now, if you show the databases again, you should see your new database in the table.
You can now start using that new database by using the "use" command:
To install PHPMyAdmin, just run the following on your Ubuntu droplet:
sudo apt-get install -y phpmyadmin
Let's break the above command down real quick.
Once installed, add "/phpmyadmin" your domain name and login to PHPMyAdmin with your MySQL login.
I'll follow up with an in depth video series on both MySQL and PHPMyAdmin in the future.