I am free to test the installation of the latest database MySQL5.6.11CentOS6.4 in the latest CentOS6.4 system. Here I will not describe the installation of CentOS6.4 with minimal installation. My
I am free to test the installation of the latest database MySQL5.6.11 CentOS 6.4 in the latest CentOS 6.4. Here I will not describe how to use CentOS 6.4 to minimize installation of My
Today, I am free to test how to install the latest database MySQL5.6.11 under the latest CentOS 6.4.
The installation of CentOS 6.4 is not described here
CentOS 6.4 minimal installation
Install MySQL5.6.11 using the source code package
Initialize the system: Disable iptables and selinux for testing only.
Install the dependent packages required by mysql
# Yum install-y wget gcc-c ++ ncurses-devel cmake make perl
Download mysql5.6.11
# Wget
CentOS 6.4 is installed by default. This file is available in/etc/my. cnf and needs to be renamed (otherwise it will affect the startup of subsequent services)
For details about the error, refer to my other introduction.
Create a mysql group and user
# Groupadd mysql
# Useradd-g mysql
Create storage directory
# Mkdir/usr/local/mysql
# Mkdir/data/mysql
Decompress the mysql tar package
# Tar zxvf mysql-5.6.11.tar.gzcmake \
-DCMAKE_INSTALL_PREFIX =/usr/local/mysql \
-DMYSQL_UNIX_ADDR =/usr/local/mysql. sock \
-DDEFAULT_CHARSET = utf8 \
-DDEFAULT_COLLATION = utf8_general_ci \
-DWITH_MYISAM_STORAGE_ENGINE = 1 \
-DWITH_INNOBASE_STORAGE_ENGINE = 1 \
-DWITH_ARCHIVE_STORAGE_ENGINE = 1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE = 1 \
-DWITH_MEMORY_STORAGE_ENGINE = 1 \
-DWITH_READLINE = 1 \
-DENABLED_LOCAL_INFILE = 1 \
-DMYSQL_DATADIR =/data/mysql \
-DMYSQL_USER = mysql \
-DMYSQL_TCP_PORT = 3306
# Cd mysql-5.6.11
# Make; make install
It may take a long time to get a cup of water ,~~
Add an environment variable to the command to be executed by mysql.
# Vi/etc/profile
Add a sentence
PATH = $ PATH:/usr/local/mysql/bin:/usr/local/mysql/lib/
Export PATH
Save the launch and make it take effect immediately
# Source/etc/profile
Grant mysql Permissions
# Chown-R mysql: mysql/usr/local/mysql
# Chown-R mysql: mysql/data/mysql
Execute the initialization configuration script to create the database and table that comes with the system.
# Mysql_install_db -- user = mysql -- datadir =/data/mysql
The initialization script generates a configuration file in/usr/local/mysql/my. cnf.
Copy Service Startup Script
# Cp/usr/local/mysql/support-files/mysql. server/etc/init. d/mysqld
Then you can start mysql
# Server mysqld restart
Set startup
# Chkconfig mysqld on
Set a password for mysql
# Mysql directly enters mysql (the initial mysql has no password)
> Use mysql;
> Update user set password = password (111111) where user = 'root'; set password 111111 for root
> Flush privileges; refresh the table to make it take effect.
> \ Q exit. A password is required when you enter mysql again.
# Mysql-uroot-p 111111.
>
The installation of mysql5.6.11 is over.