ubuntu17.04下mysql5.7.18源码安装
2017-06-04 18:01
267 查看
1、下载mysql5.7.18源码(带有boost)
下载 地址为https://dev.mysql.com/downloads/mysql/
2、添加mysql组及用户
参考https://dev.mysql.com/doc/refman/5.7/en/installing-source-distribution.html
需要 先安装
[/code]
5、启动
service mysqld stop 关闭服务
servcie mysqld restart重启服务
6、添加环境变量
在/etc/profile文件中添加export PATH=/usr/local/mysql/bin:$PATH
然后执行source /etc/profile
在编译过程中失败时
然后再重新编译
参考:http://blog.csdn.net/xyang81/article/details/51792144
http://www.feiyan.info/33.html
下载 地址为https://dev.mysql.com/downloads/mysql/
2、添加mysql组及用户
groupadd mysql #
添加
mysql
用户组
useradd -r -g mysql -s /bin/false mysql #
添加
mysql
用户 3、编译mysql源码 及安装sudo[code]apt-get
install
libncurses5-dev
参考https://dev.mysql.com/doc/refman/5.7/en/installing-source-distribution.html
需要 先安装
[/code]
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DWITH_BOOST=
/home/wl/mysql-5.7.18/boost/boost_1_59_0
-DSYSCONFDIR=/etc -D
D
EFAULT_CHARSET=utf8mb4 -DDEFAULT_COLLATION=utf8mb4_general_ci -DENABLED_LOCAL_INFILE=1 -DEXTRA_CHARSETS=all -DWITH_DEBUG=1 make make install 4、初始化系统数据库[/code]
cd /usr/local/mysql
chown -R mysql:mysql .
./bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data[/code]
./bin/mysql_ssl_rsa_setup
chown -R root .
chown -R mysql data[/code]
5、启动
bin/mysqld_safe --user=mysql & 也可以服务自启动[/code]
cp support-files/mysql.server /etc/init.d/mysqld
update-rc.d mysqld defaults[/code]使用service mysqld start来启动
service mysqld stop 关闭服务
servcie mysqld restart重启服务
6、添加环境变量
在/etc/profile文件中添加export PATH=/usr/local/mysql/bin:$PATH
然后执行source /etc/profile
在编译过程中失败时
rm -f CMakeCache.txtmake clean
然后再重新编译
参考:http://blog.csdn.net/xyang81/article/details/51792144
http://www.feiyan.info/33.html
相关文章推荐
- MySQL5.7.18源码编译安装笔记【Ubuntu篇】
- ubuntu 10.10 源码编译安装mysql 5.1
- 在ubuntu中用源码编译方式安装好了mysql和php
- Ubuntu 13.04中源码方式安装MySQL 5.5.33
- ubuntu下源码安装mysql-5.1.34
- ubuntu 10.10 源码编译安装mysql 5.5
- ubuntu 14.04 nginx + mysql + php源码安装
- Ubuntu 12.04 mysql 源码安装--mysql.5.5.x
- 在ubuntu10服务器下源码编译安装mysql-5.6.12
- ubuntu/redhat/centOS下源码安装nginx+php+mysql
- ubuntu 10.10 源码安装 nginx php mysql
- ubuntu 源码安装Mysql
- 在ubuntu下使用源码包安装mysql
- 在Ubuntu中使用源码编译安装Apache+MySQL+PHP+phpMyAdmin
- ubuntu 源码MySQL 5.6安装后链接不上mysql.sock的问题
- ubuntu10.10,下载mysql源码,编译安装
- ubuntu源码编译安装mysql-5.5.25a
- ubuntu13.10 源码安装apache2,php5,mysql 遇到的困难和解决方法
- ubuntu mysql-5.1.62源码安装
- Ubuntu13.04下源码安装mysql