Skip to content

MySQL Installation#

Because MySQL is such a popular database engine, installing it is super easy: sudo apt install mysql-server

Given some time, you'll eventually have MySQL Server installed and running on your server. Using lsof we are able to confirm we have TCP/3306 open on our system and waiting for inbound network connections:

1
2
3
$ sudo lsof -i TCP:3306
COMMAND   PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
mysqld  14957 mysql   24u  IPv4  56832      0t0  TCP localhost:mysql (LISTEN)

You can make the service starts on reboot by enabling it in systemd:

1
2
3
$ sudo systemctl enable mysql
Synchronizing state of mysql.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable mysql

And that's all there is to installing MySQL Server on an Ubuntu Server 20.04 system.

Next#

Now we will look at the configuration file for MySQL Server and check out some tools for optimising the whole server.