After obtaining mysql-4.0.20.tar.gz, unlocked in / usr / local directory: # CD / usr / local # tar zxvf mysql-4.0.20.tar.gz # cd mysql-4.0.20 # CD SQL Edit MySQLD.cc, in 2919, turn the value of Max_Connections by 100 to 2000 to set the Configure installation option, select the installation directory (prefix) and support the Chinese BIG5 code (with-charset = BIG5): # ./configure --Prefix = / usr / local / mysql / # - with-charset = BIG5 (SJIS is Japan) Start compiling and install: # make # make install # cd / usr / local / mysql / bin # ./mysql_install_db // Initialization Database
# vi ~ / .bashrc Join ExpORT PATH = "$ PATH: / USR / local / mysql / bin" // Add commands under MySQL / BIN to the system PATH
Join the startup item # cp /usr/local/mysql/share/mysql/mysql.server /etc/rc.d/init.d/mysql // Copy the mysql service startup item file # chmod x /etc/rc.d/ Init.d / mysql // Execute Permissions # UserAdd MySQL // Construction MySQL User # chown -r mysql / usr / local / mysql # chown -r mysql /etc/rc.d/init.d/mysql // Give MySQL users Permissions # / sbin / chkconfig --del mysql # / sbin / chkconfig --Add mysql // put mysql in the list of startup items