Home > Database > Mysql Tutorial > 在RHEL 5.4上编译安装MySQL 5.1.54并使之支持SphinxSE

在RHEL 5.4上编译安装MySQL 5.1.54并使之支持SphinxSE

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 17:01:11
Original
1061 people have browsed it

3,这时候不需要密码就进入MySQL了:use mysql;update user set password=password(quot;PASSWORDquot;) where user=quot;ro

操作系统:

RHEL 5.4

下载MySQL 5.1.54:

wget -c

下载SphinxSE 1.10-beta:

wget -c

详细操作步骤:

cd ~

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

tar -xzvf mysql-5.1.54.tar.gz

mkdir mysql-5.1.54/storage/sphinx

cd mysql-5.1.54/storage/sphinx

cp ~/sphinx-1.10-beta/mysqlse/* ./(将mysqlse目录下面的全部文件拷贝到新建立的sphinx目录下。)

cd ~/mysql-5.1.54

sh BUILD/autorun.sh(缺少这一步,在下面./configure的时候可能会报找不到sphinx plugin的错误。)

./configure --with-plugins=sphinx

make

sudo make install(安装成功)

对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

启动MySQL:

/etc/init.d/mysql.server start

成功启动之后,使用mysqladmin修改root密码:

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

忘记root口令的解决办法:(附)

1,如果MySQL正在运行,,那么使用如下命令杀掉:

killall -TERM mysqld

2,使用如下命令启动MySQL:

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

3,这时候不需要密码就进入MySQL了:

use mysql;

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

flush privileges;

4,再次杀掉MySQL,然后使用如下命令正常启动:

/etc/init.d/mysql.server start

linux

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template