4. cdmysql-5.1.735... configure -- prefixusrlocalmysql -- localstatedirdatamysql_db -- with-mysqld-ldflags-all-static -- with-client-ldflags-all-static -- w
1. groupadd mysql 2. useradd-g mysql 3. tar-zxvf mysql-5.1.73.tar.gz 4. cd mysql-5.1.73 5 .. /configure -- prefix =/usr/local/mysql -- localstatedir =/data/mysql_db -- with-mysqld-ldflags =-all-static -- with-client-ldflags =-all-static -- w
1. groupadd mysql
2. useradd-g mysql
3. tar-zxvf mysql-5.1.73.tar.gz
4. cd mysql-5.1.73
5 .. /configure -- prefix =/usr/local/mysql -- localstatedir =/data/mysql_db -- with-mysqld-ldflags =-all-static -- with-client-ldflags =-all-static -- with-extra-charsets = utf8, gbk -- with-plugins = innobase, myisam -- with-server-suffix =-community -- with-unix-socket-path =/usr/local/mysql/sock/mysql. sock
-- Enable-thread-safe-client -- enable-plugin er -- enable-profiling-without-embedded-server -- without-debug -- without-plugin
./Configure -- prefix =/usr/local/mysql // specify the mysql installation path
-- Localstatedir =/data/mysql_db // specify the path for storing database files
-- With-mysqld-ldflags =-all-static // compile the server in static mode
-- With-client-ldflags =-all-static // compile the client statically
-- With-extra-charsets = utf8, gbk // Add utf8, gbk character set
-- With-plugins = innobase, myisam // Add a mysql storage engine
-- With-server-suffix =-community // Add a suffix to the string of the mysqld version
-- With-unix-socket-path =/usr/local/mysql/sock/mysql. sock
-- Enable-thread-safe-client // compile the client in thread mode to improve performance
-- Enable-javaser // use assembly to improve performance
-- Enable-profiling // enable the profile function
-- Without-embedded-server // remove embedded
-- Without-debug // remove the debug mode to improve performance
-- Without-example // remove the example mode to improve performance
6. make & make install
7. cp support-files/my-medium.cnf/etc/my. cnf
8./usr/local/mysql/bin/mysql_install_db -- user = mysql &
9./usr/local/mysql/bin/mysqld_safe-user = mysql &
10. cp support-files/mysql. server/etc/rc. d/init. d/mysqld
11. chmod 700/etc/rc. d/init. d/mysqld
12. chkconfig -- add mysqld
13. chkconfig -- level 345 mysqld on
14. service mysqld start
15./usr/local/mysql/bin/mysqladmin-uroot password yourpassword
16./usr/local/mysql/bin/mysql-uroot-p yourpassword