How to install MySQL Server on Debian 8.5

This quick Debian tutorial will show you how to install MySQL Server on Debian 8.5. Its pretty easy to install MySQL on Debian and all its derivatives. On this example, I am installing MySQL server on a headless Debian. So, I don’t have any desktop GUI on my Debian. So, Terminal console is the one I am dealing with. But this should be fine.

Once login, execute this command to install MySQL Server (as root)

apt-get install mysql-server

In a moment, your MySQL Server should be ready. You will be asked to specify password for MySQL root user. Next, execute this command to configure MySQL Server

mysql_secure_installation

Answer the question to complete the wizard. Now, your MySQL Server is up and running. Check the MySQL Status with this command

service mysql status

Output:

root@debian-mysql:/etc/mysql# service mysql status
● mysql.service - LSB: Start and stop the mysql database server daemon
   Loaded: loaded (/etc/init.d/mysql)
   Active: active (running) since Wed 2016-06-29 23:06:40 EDT; 25min ago
   CGroup: /system.slice/mysql.service
           ├─5371 /bin/sh /usr/bin/mysqld_safe
           └─5718 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --...

Jun 29 23:06:40 debian-mysql /etc/mysql/debian-start[5779]: mysql.help_keywor...
Jun 29 23:06:40 debian-mysql /etc/mysql/debian-start[5779]: mysql.help_relati...
Jun 29 23:06:40 debian-mysql /etc/mysql/debian-start[5779]: mysql.help_topic ...
Jun 29 23:06:40 debian-mysql /etc/mysql/debian-start[5779]: mysql.host       ...
Jun 29 23:06:40 debian-mysql /etc/mysql/debian-start[5779]: mysql.ndb_binlog_...
Jun 29 23:06:40 debian-mysql /etc/mysql/debian-start[5779]: mysql.plugin     ...
Jun 29 23:06:40 debian-mysql /etc/mysql/debian-start[5779]: mysql.proc       ...
Jun 29 23:06:40 debian-mysql /etc/mysql/debian-start[5779]: mysql.procs_priv ...
Jun 29 23:06:41 debian-mysql /etc/mysql/debian-start[5830]: Checking for inse...
Jun 29 23:06:41 debian-mysql /etc/mysql/debian-start[5835]: Triggering myisam...
Hint: Some lines were ellipsized, use -l to show in full.

Done.

Admin

Leave a Reply

Your email address will not be published. Required fields are marked *