Install MySQL 6.6 on CentOS 5.6
Source code Installation
Yum-y install gcc-c ++ gcc-g77 autoconf automake zlib * fiex * libxml * ncurses-devel libmcrypt * libtool-ltdl-devel * make cmake
Compile and install
[Root @ server182 ~] # Groupadd mysql
[Root @ server182 ~] # Useradd-r-g mysql
Mysql-5.6.10.tar.gz download: http://download.csdn.net/download/wormsnake/5116910
[Root @ server182 ~] # Tar-zxvf mysql-5.6.10.tar.gz
[Root @ server182 ~] # Cd mysql-5.6.10
[Root @ server182 mysql-5.6.10] # cmake.
[Root @ server182 mysql-5.6.10] # make & make install
------------------------- By default, it is installed in/usr/local/mysql
[Root @ server182 ~] # Chown-R mysql. mysql/usr/local/mysql
[Root @ server182 ~] # Cd/usr/local/mysql/scripts
[Root @ server182 ~] #./Mysql_install_db -- user = mysql -- basedir =/usr/local/mysql -- datadir =/usr/local/mysql/data
[Root @ server182 ~] # Cd/usr/local/mysql/support-files
[Root @ server182 support-files] # cp mysql. server/etc/rc. d/init. d/mysql
[Root @ server182 support-files] # cp my-default.cnf/etc/my. cnf
[Root @ server182 ~] # Chkconfig-add mysql
[Root @ server182 ~] # Chkconfig mysql on
[Root @ server182 ~] # Service mysql start
Starting MySQL SUCCESS!
Change Password
Mysqladmin-u root password '123'
Login
Mysql-u root-p
Modify remote access permissions
1. Change the table. It may be that your account is not allowed to log on remotely, but only on localhost. At this time, you only need to log in to mysql on the computer of localhost, and change the "host" entry in the "user" table in the "mysql" database to "%" from "localhost"
Copy SQL code
1. mysql-u root-pvmwaremysql> use mysql;
2. mysql> update user set host = '%' where user = 'root ';
3. mysql> select host, user from user;
2. Authorization method. For example, if you want myuser to use mypassword to connect to the mysql server from any host.
Copy SQL code
Grant all privileges on *. * TO 'root' @ '%' identified by '000000' with grant option;
Flush privileges;