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