Universal binary MySQL is the official compiled installation program, relatively simple method of compiling and installation, and save time, this article is based on mysql-5.5.33 installation, formerly known as mysql-5.5.33-linux2.6-x86_64. tar.gz, I have renamed the mysql-5.5.33, the system uses CentOS 6.5
1. First extract the installation files to/usr/local and create a soft connection to MySQL
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4D/A5/wKioL1RWPLXBj2iaAADnhZD4TEU257.jpg "title=" 1.jpg " alt= "Wkiol1rwplxbj2iaaadnhzd4teu257.jpg"/>
2. Prepare MySQL group and MySQL User:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4D/A5/wKioL1RWPhiA6ds7AABfz26xg3o826.jpg "title=" 1.jpg " alt= "Wkiol1rwphia6ds7aabfz26xg3o826.jpg"/>
3. Create an LV partition to dynamically expand disk space later when the data grows, then format the Ext4 file system type and mount to/mydata:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4D/A5/wKioL1RWQUHiVPpZAACQr_sMuqQ426.jpg "title=" 1.jpg " alt= "Wkiol1rwquhivppzaacqr_smuqq426.jpg"/>
4. Create a directory MyData in MyData, and change the genus to MySQL for MySQL service use:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4D/A6/wKiom1RWQjfTSfNrAADnwEaiD58564.jpg "title=" 1.jpg " alt= "Wkiom1rwqjftsfnraadnweaid58564.jpg"/>
5, initialize MySQL, directory is just created/mydata/mydata, user identity for mysql:650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M01/4D/A6/ Wkiol1rwreqcq5lbaagxot2i6w8389.jpg "title=" 1.jpg "alt=" Wkiol1rwreqcq5lbaagxot2i6w8389.jpg "/>6, provides boot start service scripts and verifies that:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4D/A6/wKioL1RWRvHi4NV-AACvzd_u0s4606.jpg "title=" 1.jpg " alt= "Wkiol1rwrvhi4nv-aacvzd_u0s4606.jpg"/>
7. Provide MySQL configuration file:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4D/A6/wKioL1RWR8nwJgZ-AACFfnMl17c815.jpg "title=" 1.jpg " alt= "Wkiol1rwr8nwjgz-aacffnml17c815.jpg"/>
The following modifications were made in the/etc/my.cnf file:
Thread_concurrency = 4 #是物理核心的2倍数
DataDir =/mydata/mydata #指定存储数据的路径, is the newly added row
8, start the MYSQ service, check whether the temporary files are generated, log on to the MySQL service test:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4D/A6/wKiom1RWSAyiAe93AAD4UKSKjqs842.jpg "title=" 1.jpg " alt= "Wkiom1rwsayiae93aad4ukskjqs842.jpg"/>
9, the following mysql.sock is the MySQL client and the server is the sock file generated for convenient communication on one of the servers, if MySQL is installed using RPM, the file is in the/var/lib/mysql directory:
[Email protected] mysql]# Ll/tmp/mysql.sock
srwxrwxrwx 1 mysql mysql 0 May 09:58/tmp/mysql.sock
10. Import the MySQL client command path and use the MySQL command to connect the test:
[Email protected] mysql]# vim/etc/profile.d/mysql.sh
Export Path=/usr/local/mysql/bin: $PATH
[Email protected] mysql]#. /etc/profile.d/mysql.sh
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4D/A6/wKioL1RWSmrAYDYrAAFYPa0pYR0847.jpg "title=" 1.jpg " alt= "Wkiol1rwsmraydyraafypa0pyr0847.jpg"/>
MySQL has been successfully connected and can be used normally.
This article is from the "Linux" blog, so be sure to keep this source http://zhangshijie.blog.51cto.com/806066/1571059
Installing MySQL using the Universal binary binary