centos5.10下源码编译mysql5.1.73
1. groupadd mysql 2. useradd -g mysql mysql 3. tar -zxvf mysql-5.1.73.tar.gz 4. cd mysql-5.1.73 5. ./configure --prefix=/usr/local/mysql --localstatedir=/data/mysql_db --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --w
1. groupadd mysql
2. useradd -g mysql mysql
3. tar -zxvf mysql-5.1.73.tar.gz
4. cd mysql-5.1.73
5. ./configure --prefix=/usr/local/mysql --localstatedir=/data/mysql_db --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static
--with-extra-charsets=utf8,gbk --with-plugins=innobase,myisam --with-server-suffix=-community
--with-unix-socket-path=/usr/local/mysql/sock/mysql.sock
--enable-thread-safe-client --enable-assembler --enable-profiling
-without-embedded-server --without-debug --without-bench
./configure
--prefix=/usr/local/mysql //指定mysql安装路径
--localstatedir=/data/mysql_db //指定数据库的库文件存放路径
--with-mysqld-ldflags=-all-static //以静态方式编译服务器端
--with-client-ldflags=-all-static //以静态方式编译客户端
--with-extra-charsets=utf8,gbk //添加utf8、gbk字符集
--with-plugins=innobase,myisam //添加mysql存储引擎
--with-server-suffix=-community //为mysqld版本字符串添加后缀
--with-unix-socket-path=/usr/local/mysql/sock/mysql.sock
--enable-thread-safe-client //以线程方式编译客户端,提高性能
--enable-assembler //使用汇编,提高性能
--enable-profiling //启用profile功能
--without-embedded-server //去除embedded
--without-debug //去除debug模式,提高性能
--without-bench //去除bench模式,提高性能
6. make && make install
7.cp support-files/my-medium.cnf /etc/my.cnf
8. /usr/local/mysql/bin/mysql_install_db --user=mysql &
9. /usr/local/mysql/bin/mysqld_safe -user=mysql &
10. cp support-files/mysql.server /etc/rc.d/init.d/mysqld
11. chmod 700 /etc/rc.d/init.d/mysqld
12. chkconfig --add mysqld
13. chkconfig --level 345 mysqld on
14. service mysqld start
15./usr/local/mysql/bin/mysqladmin -uroot password yourpassword
16./usr/local/mysql/bin/mysql -uroot -p yourpassword
上一篇: mysql 查看表结构_MySQL
推荐阅读
-
Linux下源码编译安装配置SVN服务器的步骤分享
-
Mac系统下源码编译安装MySQL 5.7.17的教程
-
Linux下源码编译安装MySql,centeros7
-
Linux+php+apache+oracle环境搭建之CentOS下源码编译安装PHP
-
CentOS 7下MariaDB源码包编译安装
-
win10下Opencv源码编译支持CUDA加速的Python环境,超级详细教程!
-
Linux下安装mysql的方式(yum和源码编译两种方式)
-
Linux下安装mysql(yum和源码编译两种方式)
-
LINUX下编译源码时所需提前安装的常用依赖包列表
-
Ubuntu下编译VLC Android源码so库详解