Compile and install MySQL5.1.54 on RHEL5.4 and make it support SphinxSE

Source: Internet
Author: User
3. In this case, you do not need a password to enter MySQL: usemysql; updateusersetpasswordpassword (quot; PASSWORDquot;) whereuserquot; ro

3. In this case, MySQL is entered without a password: use mysql; update user set password = password (quot; PASSWORDquot;) where user = quot; ro

Operating System:

RHEL 1, 5.4

Download MySQL 5.1.54:

Wget-c

Download SphinxSE 1.10-beta:

Wget-c

Detailed operation steps:

Cd ~

Tar-xzvf sphinx-1.10-beta.tar.gz

Tar-xzvf mysql-5.1.54.tar.gz

Mkdir mysql-5.1.54/storage/sphdir

Cd mysql-5.1.54/storage/sphinx

Cp ~ /Sphexample-1.10-beta/mysqlse/*./(copy all the files under the mysqlse directory to the newly created sphinx directory .)

Cd ~ Mysql-5.1.54

Sh BUILD/autorun. sh (if this step is missing, the sphsf-plugin error may not be found in./configure .)

./Configure -- with-plugins = sphure

Make

Sudo make install (installation successful)

Initialize MySQL:

Sudo-s

Chown-R root: mysql/usr/local/mysql

/Usr/local/bin/mysql_install_db -- dadadir =/usr/local/mysql/var

Cp path/to/mysql-5.1.54/support-files/my-medium.cnf/etc/my. cnf

Chown-R mysql/usr/local/var

Cp path/to/mysql-5.1.54/support-files/mysql. server/etc/init. d/

Chmod a + x/etc/init. d/mysql. server

Start MySQL:

/Etc/init. d/mysql. server start

After successful startup, use mysqladmin to change the root password:

/Usr/local/bin/mysqladmin-u root-p password PASSWORD

Solutions for forgetting the root password: (attached)

1. If MySQL is running, run the following command to kill it:

Killall-TERM mysqld

2. Run the following command to start MySQL:

/Usr/local/bin/mysqld_safe -- skip-grant-tables &

3. You do not need a password to access MySQL at this time:

Use mysql;

Update user set password = password ("PASSWORD") where user = "root ";

Flush privileges;

4. Run the following command to kill MySQL again:

/Etc/init. d/mysql. server start

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.