Install MySQL 6.6 on CentOS 5.6

Source: Internet
Author: User

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;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.