CentOS 5.8 64-bit system installation mysql5.6.1

Source: Internet
Author: User

mysql5.5 more than version compilation requires CMake

1 Installing CMake

wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz

TAR-ZXVF cmake-2.8.10.2.tar.gz

CD CD cmake-2.8.10.2

./configure

Make

Make install

To this cmake installation is complete

2 Installing MySQL

Check if MySQL is already installed

Rpm-qa | grep MySQL (if it is already installed, you need to uninstall it first)

RPM-E--nodeps mysql-libs-5.1.61-4.el6.x86_64 (uninstall MySQL)

Groupadd MySQL (add MySQL user group)

Useradd-g mysql-s/sbin/nologin MySQL (added MySQL user does not allow direct login)

TAR-ZXVF mysql-5.6.13.tar.gz

CD mysql-5.6.13

CMake.
-dcmake_install_prefix=/usr/local/mysql
-dmysql_datadir=/usr/local/mysql/data
-ddefault_charset=utf8
-ddefault_collation=utf8_general_ci

-dextra_charsets=all
-denabled_local_infile=1 (cmake compile MySQL)

Make

Make install

Make clean

Chown-r Mysql:mysql/usr/local/mysql

(Requires chmod 755 scripts/mysql_install_db assignment to file execution rights before execution)

/usr/local/mysql/scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data

Cp/usr/local/mysql/support-files/mysql.server/etc/init.d/mysqld

chmod 755/etc/init.d/mysql

Chkconfig--add mysqld

Chkconfig mysqld on

Service mysqld Restart

Add to environment variable

Vi/etc/profile

Add the following code export path= "$PATH:/usr/local/mysql/bin"

Source/etc/profile

Log in to MySQL

MYSQL-UROOT-P//Login MySQL does not need to enter the password for the first time landing

Use MySQL;

Delete from user where user= '; Delete a user with a blank user name

UPDATE user SET Password=password ("123456") WHERE user= ' root '; To modify the root user's password

MySQL Add user's command

Grant all privileges the db_test.* to [email protected] "%" identified by ' 123456 ' with GRANT option;

This adds a Db_user user action to the database db_test the default password is 123456

Flush privileges;//Refresh Permissions

CentOS 5.8 64-bit system installation mysql5.6.1

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.