centos下源码安装mysql-5.1.53

页面导航:首页 > 数据库 > Mysql > centos下源码安装mysql-5.1.53

centos下源码安装mysql-5.1.53

来源: 作者: 时间:2016-02-05 10:57 【

centos下源码安装mysql-5.1.530. 设置PATH[[email protected] ~]# export PATH=$PATH:/usr/man/mysql/bin1. 解压mysql的源码包mysql-5.1.53.tar.gz,切换到安装目录下[[email protected] ...
centos下安装-5.1.53
 
0. 设置PATH
[[email protected] ~]# export PATH="$PATH:/usr/man/mysql/bin"

1. 解压mysql的源码包mysql-5.1.53.tar.gz,切换到安装目录下
[[email protected] mysql-5.1.53]# ./configure --prefix=/usr/man/mysql --sysconfdir=/usr/man/mysql --localstatedir=/usr/man/mysql/data --with-unix-socket-path=/usr/man/mysql/tmp/mysql.sock --with-charset=gbk --with-plugins=innobase --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static

#sysconfdir表示mysql的配置文件路径,localstatedir表示数据文件路径,socket配置和最后2

个属性主要用来提升性能

#如果要使用innodb引擎,记得加上--with-plugins=innobase

2. install
 [[email protected] mysql-5.1.53]# make
 [[email protected] mysql-5.1.53]# make install


3. config
[[email protected] mysql-5.1.53]# cp /usr/man/mysql/share/mysql/my-medium.cnf /usr/man/mysql/my.cnf


4. 切换到mysql的bin目录下,run
[[email protected] bin]#./mysql_install_db --basedir=/usr/man/mysql --


datadir=/usr/man/mysql/data


5. 复制/usr/man/mysql/libexec/mysqld到mysql的bin目录下,启动mysql服务
[[email protected] bin]#  cp /usr/man/mysql/libexec/mysqld /usr/man/mysql/bin


6. run mysql service
/usr/man/mysql/bin/mysqld_safe --ledir=/usr/man/mysql/bin --log-error=/usr/man/mysql/data/t.err --datadir=/usr/man/mysql/data --socket=/usr/man/mysql/tmp/mysql.sock --pid-file=/usr/man/mysql/bin/mysqld.pid &

 


Tags:

文章评论

最 近 更 新
热 点 排 行
Js与CSS工具
代码转换工具

<