Redhat 6.5 "Source compilation installation Mysql-5.5.47"

Source: Internet
Author: User

Operating system: Redhat Enterprise Linux 6.5

I. Create user, directory, and Modify permissions

[[email protected] ~]#mkdir-P/Usr/Local/Mysql/Data[[email protected] ~]#groupadd MySQL[[email protected] ~]#useradd-g MySQL MySQL[[email protected] ~]#chown-R Mysql.mysql/Usr/Local/Mysql/Data/   

Two. Install the required related library files

[[email protected] ~] -y gcc gcc-c+ + gcc-G77 autoconf automake zlib* fiex* libxml< c12>* ncurses-devel libmcrypt* libtool-Ltdl-devel* CMake

Third, decompression mysql-mysql-5.5.47

[[email protected] ~] -zxvf mysql-5.5. tar.gz.

Iv. Compiling and installing

[[email protected] ~]#cd MySQL-5.5. -[[email protected] mysql-5.5.47]# CMake-Dcmake_install_prefix=/Usr/Local/MySQL[[email protected] mysql-5.5.47]# make&&Make Install[[email protected] mysql-5.5.47]# CP/Usr/Local/Mysql/Support-Files/My-Large.cnf/etc/My.cnf

V. Initializing the database

[[email protected] mysql-5.5.47] /usr/local/mysql/[[email protected] MySQL]# Scripts/--user=mysql--basedir=/usr/local/mysql/--datadir=/usr/local/mysql/data/ 

Six, set the startup script location and boot start

[[email protected] MySQL] /usr/local/MySQL/support-files/etc/ INIT.D/mysqld[[email protected] MySQL] on

Vii. Adding environment variables

[[email protected] MySQL] ' export Path=/usr/local/mysql/bin: $PATH ' >> /etc/profile[[email protected] MySQL]/etc /Profile

Eight, start the MySQL service

[]/etc/init.d/mysql start

IX. installation Complete modify MySQL password and remote access

[[email protected]]# MySQL-U root-penter Password: Default no password, enter MySQL directly> UseMysql;mysql> Update User SetPassword=Password ("123456");//Change Password MySQL> Update User Set' Host '= '%' where`User`= 'Root'Limit1;//modify remote access to MySQL> Exit  //Exit

Ten, restart MySQL

[]/etc/init.d/mysqld restart

Redhat 6.5 "Source compilation installation Mysql-5.5.47"

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.