This article describes how to install the MySQL database under Linux.
1. Copy the downloaded MySQL installation file to the/home directory
2.TAR-XZVF the installation file name. Successful decompression will find that the current directory will be more than one folder.
3. Configuration < This is the most important ah, think about why this change? >
Let's first list the parameters that need to be modified.
① creating a MYSQL Group
Groupadd MySQL
Cat/etc/group | more//to see if the creation was successful
Why would you want to create a MySQL user group? Only people who join the group can use the database! Control rights Management.
② create mysql user and put it into MySQL group
Useradd-g MySQL mysql//add users
passwd mysql//Set Password
Rename folder name
MV Mysql-5.7.12-linux-glibc2.5-x86_64 MySQL
③ into the MySQL folder scripts/mysql_install_db--user==mysql ( Initialize database )
④chown-r Root. ( Modify the owner of the file )//. represents the current file
⑤chown-r MySQL data ( modify The owner of the Data folder )
⑥chgrp-r MySQL. ( change user group )
MySQL installation of the Java Web Development environment under Linux