Skip to content

🐬 Install MySQL Server

mysql_banner

MySQL is an open-source relational database management system. It is a popular choice of database for use in web applications, and is a central compoenent of the widely used LAMP open-source web application software stack (Linux, Apache, MySQL, Perl/PHP, Pyton).

Info

MySQL is written in C and C++.


📥 Installation

MySQL can be installed easily on debian system using apt.

sudo apt-get install mysql-server mysql-client php5-mysql

Important

During the installation you will have to enter a password for the root user of the mysql-server.


⚙️ Configuration

In order to finalize the MySQL installation, it is recommended to execute the following procedure:

# execute secure installation
sudo mysql_secure_installation
#    Change the root password? [Y/n]                [n]
#    Remove anonymous users? [Y/n]                  [y]
#    Disallow root login remotely? [Y/n]            [y]
#    Remove test database and access to it? [Y/n]   [y]
#    Reload privilege tables now? [Y/n]             [y]

# login using root password
mysql -u root -p

Tip

The MySQL server is up and running at this point.