First, update the data source
apt-get update
Second, install MySQL
apt-get install mysql-server
You will be prompted to create a root password during installation. Choose a secure password, and make sure you remember it, because you need it later. Next, we will complete the MySQL configuration.
Configuration
Because it is a new installation, you need to run a script that comes with security. This changes some of the less secure default options, such as remote root login and user examples. On older versions of MySQL, you need to manually initialize the data directory, but Mysql 5.7 has automatically completed.
Modify the configuration mysqld.cnf profile
vi /etc/mysql/mysql.conf.d/mysqld.cnf
The need to place the red mark into this, or use the # comment this line
so that you can get the database operating system connected to the working widow