Fedora 11 installation source code MySQL-5.1

Source: Internet
Author: User

In Fedora 11, it is difficult to install the source code MySQL. The installation process was recorded here for a long time.

Ps: the directory paths involved in this article are all my local directories. You can adjust them by yourself.

Ps: I use 5.1.32. Of course you can use the latest 5.1.35.

Step 1:


Log on to the system as a common rocrocket user, and there is no need to have a mysql user or a mysql user group in the system. (I can log on without using root)

Step 2:

Download mysql-5.1.32.tar.gz and decompress it to the/rocrocket/software/repo/src/mysql-5.1.32 directory:

$ Tar-xzvf mysql-5.1.32.tar.gz-C/rocrocket/software/repo/src

$ Cd/rocrocket/software/repo/src/mysql-5.1.32

Step 3:

Run./configure

. /Configure-prefix =/rocrocket/software/program/mysql-5.1.32-with-charset = utf8-with-extra-charsets = all-with-unix-socket-path =/rocrocket/software /program/mysql-5.1.32/mysql. sock

Step 4:

Compile and install

Make & make install

Step 5:

Copy configuration file

Cd/rocrocket/software/program/mysql-5.1.32

Mkdir etc

Mkdir-p var/log

Mkdir-p var/run

Cd etc

Cp/rocrocket/software/repo/src/mysql-5.1.32/support-files/my-small.cnf my. cnf

Step 6:

Edit my. cnf and add the following lines at the end:

[Mysqld_safe]
Log-error =/rocrocket/software/program/mysql-5.1.32/var/log/mysqld. log
Pid-files =/rocrocket/software/program/mysql-5.1.32/var/run/mysqld. pid

Cd ../bin

./Mysql_install_db

Step 7:

Run

/Rocrocket/software/programs/mysql-5.1.32/bin/mysqld_safe &

Last step:

View the port information:

Netstat-lntp | grep 3306

Last reminder:

To stop mysql, follow these steps (root user permission is required ):

/Rocrocket/software/program/mysql-5.1.32/bin/mysqladmin shutdown

Over ~~

 

This original article belongs to the "Linux greenhouse" blog. The blog address isHttp://roclinux.cn. The author of this article is rocrocket.
In order to prevent the negative reprinting of some websites, this information is added to the article, and readers are expected to be considerate.

Original article address:Http://roclinux.cn /? P = 1551

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.