Managing databases
Now that our MariaDB server is up and running (and we've covered some of the quirks regarding Ubuntu's implementation), we can finally look into managing it. In this section, I'll demonstrate how to connect to a database server using the mysql
command, which will allow us to create databases, remove (drop) them, and also manage users and permissions.
At the end of the last section, I mentioned that the preferred method of managing databases on Ubuntu's implementation of MariaDB is to create an administrative user to be used in place of the root
account, so we can start our discussion on database management with user management. To create this administrative user, we'll need to enter the MariaDB shell, which again, is simply a matter of executing the mysql
command as root
. Your prompt will change to the following:
MariaDB [(none)]>
Now, we can create our new administrative user. I'll call mine admin
in my examples, but you can use whatever name you'd like. In a company...