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