Download: wget http://blog.s135.com/soft/linux/nginx_php/mysql/mysql-5.1.33.zip
Installation:
Unzip mysql-5.1.33.zip
CD mysql-5.1.33.zip
. /Configure -- prefix =/usr/local/MySQL -- enable-validator -- With-extra-charsets = Complex -- enable-thread-safe-client -- With-big-tables --- readline -- With-SSL -- With-embedded-server -- enable-local-infile -- With-plugins = Innobase
Make
Make install
Useradd mysql-D/data/MySQL-S/sbin/nologin
/Usr/local/MySQL/bin/mysql_install_db -- user = MySQL
CD/usr/local/MySQL
Chown-r root: MySQL.
Mkdir-P/data/MySQL/Data
Chown-r MySQL/data/MySQL/Data
CP share/MySQL/my-huge.cnf/etc/My. CNF
CP share/MySQL. Server/etc/rc. d/init. d/mysqld
Chmod 755/etc/rc. d/init. d/mysqld
Chkconfig -- add MySQL
Service mysqld start
The following error is always reported during restart:
Error! MySQL manager or server PID file cocould not be found!
Starting mysql. Error! Manager of PID-file quit without updating file.
Solution:
MySQL compilation and installation, initializationDatabaseWhen:
Unknown option '-- skip-federated' error.
# Vi/etc/My. CNF
# Comment out this line from Skip-federated. Or Add the following parameter during compilation: -- With-plugins = all
If the problem persists, it is because you did not add datadir during configuration,
# Vi/etc/My. CNF
Add the following statement:
[mysqld]
Port = 3306
socket =/tmp/MySQL. sock
datadir =/usr/local/MySQL/Data
datadir is newly added