For simple mysql installation, we can download Mysql of binary distribution directly from the Mysql official website, such as LInuxx86_64, and decompress it to use it in green. Www. mysql. comdownloads create an OS user and a group groupaddmysqluseradd-gmysqlmysql group and the user's name is not named mysql.
For simple installation of mysql, we can download the binary distribution version of Mysql directly from the Mysql official website, such as LInux x86_64, and decompress the package to use it in green. Http://www.mysql.com/downloads/ create OS user and group groupadd mysql useradd-g mysql group and user name is not named into mysql also line, Group
For simple installation of mysql, we can download the binary distribution version of Mysql directly from the Mysql official website, such as LInux x86_64, and decompress the package to use it in green. Http://www.mysql.com/downloads/
Create OS users and groups
Groupadd mysql
Useradd-g mysql
The group name and user name are not named as mysql, and the group name and user name are not required to be consistent.
Decompress green
Extract the installation media to/usr/local or any directory that you have permission.
[Root @ erpt1 ~] # Tar-xzvf mysql-5.6.20-linux-glibc2.5-x86_64.tar.gz-C/usr/local
[Root @ erpt1] #
[Root @ erpt1] # cd/usr/local & ln-s/usr/local/mysql-5.6.20-linux-glibc2.5-x86_64 mysql
The Russian soft connection is established later to make it easier for us to access the mysql directory.
Change owner
# Chown-R mysql: mysql/usr/local/mysql-5.6.20-linux-glibc2.5-x86_64
[Root] # chown-R mysql: mysql/usr/local/mysql
Environment Variable
Add/usr/local/mysql/bin to PATH
Install db
[Mysql @ erpt1 mysql] $ cd/usr/local/mysql & scripts/mysql_install_db -- user = mysql
Mysql_install_db creates a default option my. cnf in the basic directory.
Start mysql database
Mysqld_safe &
Log on to Mysqlmysql-uroot