Mysq Installation Summary and mysq Summary
What I learned today is the installation of the mysql database. Here I will use the Binary Package for installation. If you are not familiar with the compilation optimization, we recommend that you use a binary package instead of the source code. I believe that official source code compilers will be more powerful than general developers. In addition, if Binary Package installation fails, more help can be found. The following describes how to install a binary package.
1: Download the specified installation package from the official website.
The address is http://dev.mysql.com/downloads/mysql/5.6.html#downloads. the download name isLinux-Generic (glibc 2.5) (x86, 64-bit), Compressed TAR Archive
The downloaded file is mysql-5.6.27-linux-glibc2.5-x86_64.tar.gz. As for how you put it in linux, you can use rz or directly download the binary Installation File Using wget in linux. I downloaded it and put it under/root.
2: Create a mysql installation user
Directly check the INSTALL-BINARY file for User Creation statements.
The statement is groupadd mysql.
Useradd-r-g mysql
3: Create a soft connection under/usr/local/for the unzipped directory and attach the permission.
Cd/usr/local
Ln-s/opt/mysql/mysql-5.6.27-linux-glibc2.5-x86_64 mysql
Chown-R mysql: mysql
Chown-R mysql: mysql/
4: Create the mysql database data directory, binlog directory and tmp directory
Mkdir/data/mysql/{data, logs, tmp}
Chown-R mysql: mysql/data/mysql
5: configure the my. cnf file.
Configure user, datadir, tmpdir, binlog, and put it in the place you want to put it in/etc.
6: Initialize the data database directory
Cd/usr/lcoal/mysql
. Scripts/mysql_install_db -- defaults-file = '/etc/my. cnf'
You can see two OK statements.
All the installation work here is fine.