How to: Install MySQL Server on your Ubuntu 18.04 / 19.04 VPS


In this guide, we are going to briefly cover how to install the latest version of MySQL Server on your Ubuntu 18.04 / 19.04 VPS.


To begin with, we are going to update and upgrade out system, this guide is based off a freshly configured VPS. If you are installing on an existing system, you may want to drop the -y flag from the command and inspect the upgrades before they are installed.


( Note that you need to use sudo if you are not logged in as root. We recommend that you follow this guide to learn how to create a sudo capable user other than root for security purposes https://help.skysilk.com/support/solutions/articles/9000126208-how-to-create-new-users-and-grant-sudo-privileges-to-users-on-linux )


sudo apt update && sudo apt upgrade


Once that finishes, we can move forward with installing the default mysql-server package.


sudo apt install mysql-server -y



This may take a little while depending on your system's resources. The next thing to do is use the mysql_secure_installation to remove the default information and setup our root mysql user.


sudo mysql_secure_installation



You will now be prompted with some basic setup questions, the default choices are pretty much the commonly accepted answer. Feel free to customize your choices based on your needs. Once you complete this setup, you have installed MySQL.


Test by doing:


mysql


For more in-depth information regarding MySQL security be sure to check out the official documentation --> https://dev.mysql.com/doc/refman/8.0/en/security.html 



Join our Private Discord Chat to chat with, as well as find community assistance from other Verified SkySilk Users:
https://invite.gg/SkySilk  


CLICK TO DEPLOY AN UBUNTU LINUX VPS

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.