Install MySQL 6.4 Binary Package in 64-bit CentOS 5.6
I do not like it because I want to install MySQL in Linux and it is very complicated to use the source code package:
1. You need to install the GCC compiler. While I installed linux with minimal Server Installation, so GCC is not installed.
2. Source Code installation requires./config to generate makeFile. This process is very complex and requires reading a large number of configuration documents.
Therefore, the binary installation package is used for installation.
Environment:
CentOS64-bit, version 6.4.
Mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz 292 MB.
Less libao package found during installation, use
Yum install libao
Install the libao package.
Check whether the hostname exists in the hosts file. If not, add it.
Hosts file path:/etc/hosts. Added after 127.0.0.1. IPV4.
Create a mysql user group and user. If you do not create a mysql Binary Package, problems may occur when mysql is started due to linux File permissions.
Groupadd mysql
Useradd-r-g mysql
Install mysql under/usr/local/mysql
Cd/usr/local
Tar zxvf/path/to/mysql-VERSION-OS.tar.gz
Modify and decompress the folder named mysql (of course, it can be another one)
Music mysql-5.6.12-linux-glibc2.5-x86_64 mysql
Modify the creators and creation groups of folders and files at various levels of mysql as mysql (note that the statement is followed by .)
Cd mysql
Chown-R mysql.
Chgrp-R mysql.
In fact, mysql has been installed, but Initialization is required to initialize mysql tables, test tables, infomation tables, and so on. Datadir can be another one, but also needs to be modified by chown. Otherwise, permission issues may occur.
Scripts/mysql_install_db -- user = mysql -- basedir =/usr/local/mysql -- datadir =/data/mydb
Cp support-files/mysql. server/etc/init. d/mysqld
Copy my-midle.cnf to/etc/my. cnf
Vi my. cnf; Modify basedir, datadir, and character_set_server = utf8. If not, add these three items. character_set_server is used to set the mysqld server character set in MySQL 5.5.
These three items are included in the mysqld settings.
Service mysqld start
After logging in, set the password and access:
Grant all on mysql. * to 'root' @ 'localhost' identified by 'Password ';
This article permanently updates the link address: