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
上一篇: mac下apache的访问权限问题
下一篇: laravel错误处理.app/storage/sessions.failed to open stream: Permission denied
推荐阅读
-
centos5.10下源码编译mysql5.1.73
-
Linux 下 MySQL 5.5.8 源码编译安装记录_MySQL
-
Linux下MySQL 5.5.8 源码编译安装记录分享_MySQL
-
CentOS 6.6 下源码编译安装MySQL 5.7.5
-
Python3.7源码在windows(VS2015)下的编译和安装
-
Linux 下 MySQL 5.5.8 源码编译安装记录_MySQL
-
Linux+php+apache+oracle环境搭建之CentOS下源码编译安装PHP
-
Linux 下 MySQL 5.5.8 源码编译安装记录
-
hadoop2.2.0集群配置 - 64位系统下编译源码过程
-
hadoop2.2.0集群配置 - 64位系统下编译源码过程