cent os 安装MYSQL 5.5 源码包

以前都是通过

configure

make

make install

都能完成安装通过,新版后不行了,需要用CMAKE

 

yum install cmake

还需要安装以下包:

yum search gcc

yum -y install ncurses-devel

yum install bison

yum install bison-devel

yum search gcc-c++

 

如果有出错时,安装好缺少的包,然后删除掉编译目录下的

rm CMakeCache.txt

最后:

在MYSQL目录下:

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql

make
make install

后续就是添加MYSQL用户等:

groupadd mysql
useradd -r -g mysql mysql

shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
# Next command is optional
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server

更改密码:

./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h songdemei.com password 'new-password'

 

 

 


 

你可能感兴趣的:(cent os 安装MYSQL 5.5 源码包)