Compile the source code mysql5.1.73 in centos5.10

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.