install mysql from source and troubleshooting example
I tried to install MySQL 5.7 from source file and upgrading previous MySQL version to the lastest 5.7.22.
following command record is shared as a note.
not many explanations. If having any questions, you can make a comment and I will reply when I see it.
## REFERENCE
https://dev.mysql.com/doc/refman/5.7/en/source-configuration-options.html#option_cmake_download_boost ## install tools
yum install make gcc-c++ cmake bison-devel ncurses-devel ## create user and dir
id mysql
mkdir /usr/local/mysql
mkdir -p /data/mydb chown -R mysql.mysql /usr/local/mysql
chown -R mysql.mysql /data/mydb ## unzip source package
cd /home/maxwellyang/Desktop/mysql-dev/source_code
tar -zxvf mysql-5.7..tar.gz ## make clean
cd mysql-5.7.
make clean ## run cmake
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \ # install dir
-DMYSQL_DATADIR=/data/mydb \ # data dir
-DSYSCONFDIR=/etc \ # my.cnf dir
-DEFAULT_CHARSET=utf8mb4 \
-DDEFAULT_COLLATION=utf8mb4_general_ci \
-DENABLED_LOCAL_INFILE= \
-DEXTRA_CHARSETS=all \
-DDOWNLOAD_BOOST= \ # auto download boost library file
-DWITH_BOOST=/home/maxwellyang/Desktop/mysql-dev/source_code/boost \ # boost library save dir
-DINSTALL_LAYOUT=STANDALONE make make install ## problem encountered after using the compiled version
/etc/init.d/mysqld start # execute failed without writing to mysql error log
bash -x /etc/init.d/mysqld start # to see where script stopped, suspect script maybe error out at /usr/local/mysql/bin/mysqld_safe --datadir=/data/mydb --pid-file=/data/mydb/mysql-dev.pid bash -x /usr/local/mysql/bin/mysqld_safe --datadir=/data/mydb --pid-file=/data/mydb/mysql-dev.pid # suspect script maybe error out at /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/data/mydb --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/data/mydb/.err --pid-file=/data/mydb/mysql-dev.pid --port= /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/data/mydb --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/data/mydb/.err --pid-file=/data/mydb/mysql-dev.pid --port= # this script error with [ERROR] COLLATION 'utf8mb4_general_ci' is not valid for CHARACTER SET 'latin1' # now we see problem is related to collation and characterset.
# my previous database charset is latin1, which is the default charset when installing with tar.gz package
# but the default collation for the compiled version is utf8mb4_general_ci, which is not compatible with charset latin1
# plus I don't specify collation-server paramter in /etc/my.cnf
# so one solution is to specify collation-server parameter in /etc/my.cnf, usable options is collation-server=latin1_german1_ci
# then the above /usr/local/mysql/bin/mysqld script can success
# tried the /etc/init.d/mysqld start, can work also.
install mysql from source and troubleshooting example的更多相关文章
- A very cool thing: Install MYSQL from source without root access on LINUX
最近由于工作的需要,要在centos上安装MYSQL服务器.作为一名小兵中的小兵,当然是没有root权限的,为了能够使用mysql,只能使用源码安装了(因为binary安装方式似乎需要root acc ...
- 在OSX狮子(Lion)上安装MYSQL(Install MySQL on Mac OSX)
这篇文章简述了在Mac OSX狮子(Lion)上安装MySQL Community Server最新版本v10.6.7的过程. MySQL是最流行的开源数据库管理系统.首先,从MySQL的下载页面上下 ...
- Install MySql on CentOS
Installing & Configuring MySQL Server This Howto will show you how to install MySQL 5.x, start t ...
- How to Install MySQL on CentOS 7
CentOS 7的yum源中貌似没有正常安装mysql时的mysql-sever文件,需要去官网上下载 # wget http://dev.mysql.com/get/mysql-communit ...
- gem install mysql遇到问题。解决方案
今天遇到的问题,是使用gem install mysql遇到的.报下面的错误 Building native extensions. This could take a while... ERROR: ...
- Install MySQL on Mac by Homebrew
1. 安装mysql brew update brew install mysql 2. 启动mysql mysql.server start 3. 登录mysql mysql -uroot -p ...
- yum install mysql
rpm -qa|grep -i mysqlmysql-libs-5.1.52-1.1.alios6.1.x86_64mysql-5.1.52-1.1.alios6.1.x86_64mysql-deve ...
- ubuntu install mysql server method
recently try to install mysql in my computer so that I can practise some sql statement on seve ...
- mysql加速source导入数据
mysql加速source导入数据 # 进入mysql中执行如下 ; ; ; ; -- 你的sql语句1 -- 你的sql语句2 -- 你的sql语句3 ; ; ; ;
随机推荐
- 自动化测试-13.selenium执行JS处理滚动条
前言 selenium并不是万能的,有时候页面上操作无法实现的,这时候就需要借助JS来完成了. 常见场景: 当页面上的元素超过一屏后,想操作屏幕下方的元素,是不能直接定位到,会报元素不可见的. 这时候 ...
- windows环境下安装Python的Rtree包
Rtree包是基于libspatialindex开发的,在安装Rtree之前必须先安装libspatialindex.关于libspatialindex,除了官网的英文外,这里有一个中文翻译过来的介绍 ...
- jupyter notebook中使用mpld3进行交互
用pycharm进行远程服务器debug可以说是非常的爽了,但是设置远程的图片在本地显示会非常的麻烦 jupyter可以用%matplotlib inline 来远程plt.show图片,但是有一个问 ...
- freeswitch黑名单mod_blacklist使用
freeswitch自带黑名单模块"mod_blacklist",此文只是对该模块简单使用的实例. 最近接到客户投诉有大量骚扰电话,而从源头查不太容易,因此想到的笨方法是将投诉人加 ...
- mod_conference ESL控制二(事件)
根据上篇所述功能需求,esl需要处理以下几类事件: ESL_EVENT_CHANNEL_* #channel相关事件,用户判断参会者是否应答.计费 DTMF事件 #识别参会者按键,根据按键进行操作( ...
- solr增加中文分析器
我的solr版本是5.3.0 1将jar包ik-analyzer-solr5-5.x.jar放入sor的web-inf的lib里面 2 在web-inf下面新建classes目录,再新增三个配置文件: ...
- springdata笔记
SpringData整合hibernate CRUD操作: applicationContext.xml: <?xml version="1.0" encoding=&quo ...
- 在windows上使用ssh秘钥连接git服务器
git部署在centos7上 安装好git后,新建一个用户test(注意要加入git用户组)配置ssh秘钥登录,我的另一篇博客有写配置步骤 重点的地方是在windows系统上使用秘钥登录git服务器 ...
- goaccess geoip 测试
goaccess 是一个很不错的日志实时统计分析工具,我们可以用来方便的分析nginx apcahe iis 等的日志信息 对于geoip 的支持是需要源码编译的,所以基于官方docker 镜像添 ...
- PAT 甲级 1027 Colors in Mars (20 分)
1027 Colors in Mars (20 分) People in Mars represent the colors in their computers in a similar way a ...