背景:现有mysql版本为5.5.40,考虑到以后需做主从,而5.6在主从方面、mysql读写方面都有很大提升。所以,准备升级。

官网:http://www.mysql.com/

环境:centos6.5 X86_64

安装目录:/database/mysql

解压目录:/database/mysql-5-6-24

数据存放目录:/database/sqldata

1、安装依赖包

yum install gcc gcc-c++ -y

yum install -y ncurses-devel

yum install -y openssl-devel(不安装会报错,见后文)

yum install -y cmake

yum install -y libaio

yum install -y bison

2、创建mysql用户用户组

groupadd mysql

useradd -g mysql mysql

3、cmake编译

tar –zxvf mysql-5.6.24.tar.gz

cd mysql-5-6-24cmake -DCMAKE_INSTALL_PREFIX:PATH=/database/mysql -DMYSQL_DATADIR:PATH=/database/sqldata -DEXTRA_CHARSETS=all -DENABLED_LOCAL_INFILE=1 -DWITH_READLINE=1 -DMYSQL_USER=mysql -DENABLED_LOCAL_INFILE=1 -DWITH_SSL=yes

报错:CMake Error at cmake/ssl.cmake:83 (MESSAGE):

Cannot find appropriate system libraries for SSL.  Use WITH_SSL=bundled to

enable SSL support

Call Stack (most recent call first):

CMakeLists.txt:255 (MYSQL_CHECK_SSL)

解决:安装openssl-devel,然后rm CMakeCache.txt。重新运行以上命令。

make && make install

次步时间比较长。#添加PATH

echo "PATH=$PATH:/database/mysql/bin" >> /etc/profile

source /etc/profile#修改目录权限

chown -R mysql:mysql /database/mysql

chown -R mysql:mysql /database/sqldata

#拷贝配置文件

cp /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf#设置my.conf 在[mysqld]中设置

datadir=/database/sqldata

#初始化

scripts/mysql_install_db --user=mysql --datadir=/database/sqldata  --basedir=/database/mysql

日志:

To start mysqld at boot time you have to copy

support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:

/db1/mysql/bin/mysqladmin -u root password ‘new-password‘

/db1/mysql/bin/mysqladmin -u root -h shekou password ‘new-password‘

Alternatively you can run:

/db1/mysql/bin/mysql_secure_installation

which will also give you the option of removing the test

databases and anonymous user created by default.  This is

strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

cd . ; /db1/mysql/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

WARNING: Found existing config file /db1/mysql/my.cnf on the system.

Because this file might be in use, it was not replaced,

but was used in bootstrap (unless you used --defaults-file)

and when you later start the server.

The new default config file was created as /db1/mysql/my-new.cnf,

please compare it with your file and take the changes you need.#设置mysql服务

cp /usr/local/mysql/support-files/mysql.server /etc/rc.d/init.d/mysqld

chkconfig --add mysqld

service mysql start#空密码登陆mysql

mysql

4、mysql优化及其他操作(详见其他文章)

原文:http://strongit.blog.51cto.com/10020534/1775494

mysql5.6.24安装perl_mysql5.6源码安装相关推荐

  1. Linux环境下安装MySQL(源码安装)

    Linux环境下安装MySQL(源码安装) 1.事先从官网/国内镜像站点中下载源码安装包,上传至服务器: 2.安装开发工具和开发包(从5.5开始使用cmake编译) 3.创建用户和组 4.编译安装My ...

  2. linux怎么用源码安装mysql,Linux源码安装mysql步骤

    创建文件夹: mkdir  /usr/local/webserver 安装必要依赖包 yum -y install gcc gcc-c++ make ncurses-devel 安装cmake包: t ...

  3. Ubuntu20.04软件主要管理工具包详细介绍:离线安装dpkg、在线安装apt、源码安装(适用于Github程序下载)

    Ubuntu20.04软件主要管理工具包详细介绍:离线安装dpkg.在线安装apt.源码安装(适用于Github程序下载) 一.离线安装dpkg命令 二.在线安装apt命令 三.软件包的源码安装过程 ...

  4. mysql5.6兼容包_freebsd9.1源码安装apache、mysql、php环境(亲侧通过)

    新手不建议用源码安装,请慎重 1.安装9.1系统 2.通过Sysinstall安装预装软件 ====================================================== ...

  5. unbuntu cmake安装mysql_Ubuntu下源码安装MySQL-5.5.25a

    Ubuntu下源码安装MySQL-5.5.25a,今天在Ubuntu Linux下本来玩玩Android的源码看下的.那小的怎看根目录的空间已然不多.所以想把 今天在Ubuntu Linux下本来玩玩 ...

  6. anaconda tensorflow 2.3_安装anaconda amp;源码安装lightgbm,xgboost

    一.下载anaconda安装包 进anaconda官网下载自己系统对应的安装包https://www.anaconda.com/ 二.安装anaconda 三.创建快捷键 安装完成后点击windows ...

  7. rabbitnq 源码安装_linux下源码安装rabbitMq

    一.安装erlang 前期环境安装 1.利用yum安装erlang编译所依赖的环境 yum -y install make gcc gcc-c++ kernel-devel m4ncurses-dev ...

  8. php mysql 源码 安装教程_源码安装和配置apache(httpd)和 PHP 和 mysql全过程(一)...

    [服务器环境为:CentOS6.5 64位目标:搭建LNMP(Linux + Nginx + MySQL + PHP +SVN),其中svn是用来代替ftp,方便开发中调试同步代码相关目录:所有软件都 ...

  9. Cent Os下安装软件之---源码安装

    大家好,今天给大家演示一下Cent Os下使用源码安装软件 下面以安装HTTP为例 源码安装主要包括五个步骤: 1.从网上下载安装包 apr-1.4.6.tar.gz 可移植运行环境 apr-util ...

最新文章

  1. wireshark抓包理解TCP的三次握手
  2. itext转html为pdf 锚点,ITEXT输出pdf..docx
  3. 你真的了解WebSocket吗?
  4. 尝试create tech team
  5. 《工作DNA》摘录三
  6. 分类数据的分析-卡方检验运用
  7. TMS320DM642学习----第一篇(硬件连接)
  8. .net 实现 URL重写,伪静态 1
  9. linux的cache memory解析
  10. 关于RAM的空间使用超过限度的时候报错
  11. STC1_FULLSCREEN_TABLE_CONTROL
  12. oracle10g 学习笔记上
  13. 使用servlet过滤器播放amr音频
  14. 如何选择适用企业的CRM软件?
  15. 『开源』基于jq的数学公式编辑器插件(可嵌入项目)(web前端)
  16. java解析bt协议详解_【转】bt协议的详细分析
  17. Excel必知必会——函数与公式(含vlookup与lookup)
  18. 这70道算法题你都会的话,可以直接去字节跳动了!
  19. DVB and EPG
  20. fprintf是C语言开发库的库函数,C语言问题fwrite和fprintf

热门文章

  1. 如何识别“答非所问”?使用gensim进行文本相似度计算
  2. tempdb 相关总结
  3. 知方可补不足~数据库名称和数据库别名不同了怎么办
  4. Codeforces Round #FF
  5. (转)解读NTFS(一)
  6. Hive thrift服务--beeline使用
  7. 结构体怎么赋值_c语言学习之基础知识点介绍:结构体的介绍
  8. python 类中定义列表_Python3中的自定义列表类,具有
  9. python变量和字符_Python变量和字符串
  10. cdn节点人少延迟高_让你刷剧一直爽,CDN原理是什么