Go to/usr/local/src folder
2. Download the installation package
wget http://mirrors.sohu.com/mysql/MySQL-5.1/mysql-5.1.73-linux-i686-glibc23.tar.gz
3. Unzip the tar zxvf mysql-5.1.73-linux-i686-glibc23.tar.gz
4. Create a MySQL account
Useradd-s/sbin/nologin-m MySQL
-s:shell
-M: Do not create a user directory
5. Move the extracted files to rename the/usr/local/mysql directory
MV mysql-5.1.73-linux-i686-glibc23/usr/local/mysql
6. enter into the/usr/local/mysql
7. Create a folder to hold the database and change permissions
Mkdir-p/data/mysql
Chown-r Mysql/data/mysql
8. Compiling the installation
Initializing the database
Enter the directory of the database
--user created by user
--datadir the path where the database is stored
Cd/usr/local/mysql
./scripts/mysql_install_db--user=mysql--datadir=/data/mysql
9. Does the test have the error echo $? Display 0 means no error
10.make&make install completed with echo $? Test
Put different files in different directories, first into the configuration file
CD support-files/
copy my-large.cnf files to/etc/my.cnf
CP My-large.cnf/etc/my.cnf Press Y
Copy the Mysql.server file to the/etc/init.d/mysqld directory
CP Mysql.server/etc/init.d/mysqld
chmod 755/etc/init.d/mysqld
14.vim!$ can open a file just copied
Modify basedir=/usr/local/mysql---where MySQL is located
datedir=/data/mysql----where the database resides
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/8B/15/wKioL1hEQsWxqJAdAAAo2Cjhj_Y469.png-wh_500x0-wm_3 -wmp_4-s_3865966732.png "title=" T8.png "alt=" Wkiol1heqswxqjadaaao2cjhj_y469.png-wh_50 "/>
Add the mysqld to the system boot
Chkconfig--add mysqld
Open the mysqld.
Chkconfig mysqld on
Start mysqld
/etc/init.d/mysqld start
See the startup status of Mysqld
PS aux |grep mysqld
The following error message appears, workaround
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/8B/15/wKioL1hEQjqBG9p3AACjyXVrRSI855.png-wh_500x0-wm_3 -wmp_4-s_153327154.png "title=" Tt.png "alt=" Wkiol1heqjqbg9p3aacjyxvrrsi855.png-wh_50 "/>
Change/TMP permissions
chmod 777/tmp
installation of MySQL