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"