centos下编译安装mysql5.5/5.6/5.7
2018-12-28 14:38:46 星期五
centos 系统在mysql官网, 按照教程去配置yum源, 然后安装, 不用自己找依赖了:
https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/
注: 下载链接中包含 el6 表示适合centos 6, el7表示适合centos 7
-------------------------------------------------------------------------------------------------
2013年11月16日 19:39:13
centos 6 mysql 5.5.28
我只说些我出错的地方:
cmake后删除的方法是 xargs rm < install_manifest.text
注意这个命令只会删除安装目录中的文件,而不会删除安装目录中的文件夹
--------------------------------
假如你安装的basedir是/usr/local/mysql
那么就粗犷的执行下 chown -R mysql.mysql /usr/local/mysql 保证所有的程序都可以被mysql这个用户执行
(数据库的数据目录,权限须设为你的mysql的系统管理用户,不能是root,一般默认是名为mysql用户)
否则执行 service mysqld start 时提示 The server quit without updating PID file 这样的错误
此时查看error.log里边显示的是 Can't start server : Bind on unix socket: Permission denied
----------------------------------------
安装的时候可以只
cmake -DCMAKE_INSTALL_PREFIX=/******
不写其它的配置参数
安装好后再安装目录里找到配置文件自己修改相关项就行了
参考链接:
http://www.360doc.com/content/12/0304/19/2054285_191664568.shtml
http://blog.csdn.net/zqtsx/article/details/9378703
http://www.cnblogs.com/xiongpq/p/3384681.html
等
----------------------------------------
2014年2月15日 21:33:40
yum -y install cmake
yum -y install gcc-c++ //缺少会提示, ***_CXX_COMPLIER....缺失
yum -y install ncurses ncurses-devel //缺少时,会提示此软件的名字,复制它们再yum安装就行了 如果安装过程中失败,提示缺少其他软件,安装依赖的软件后先执行:
rm CMakeCache.txt 然后再 cmake ....
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/web/mysql -DEXTRA_CHARSETS=all -DDEFAULT_CHARSETS=utf8 -DDERAULT_COLLATION=utf8_general_ci
执行 script/myslq_install_db --basedir=.... --datadiar=.... 后,提示怎样去设置密码以及怎样设置随系统启动
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: /usr/local/web/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/web/mysql/bin/mysqladmin -u root -h AY1402041644126082e5Z password 'new-password'
怎样启动MYSQL以及怎样测试MYSQL
You can start the MySQL daemon with: cd . ; /usr/local/web/mysql/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd mysql-test ; perl mysql-test-run.pl
另外,我在执行这段安装数据库的脚本前,就已经将my-default.cnf复制到安装根目录下边并重命名为my.cnf,这时程序提示
WARNING: Found existing config file /usr/local/web/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 /usr/local/web/mysql/my-new.cnf,
please compare it with your file and take the changes you need
其实,该脚本程序创建的my-new.cnf和my-default.cnf的内容是一样的:基本上没有什么内容
在安装完成mysql,以及初始化数据库,修改用户组,安装service服务后,先不要启用新版本的my.cnf里的socket指令,否则执行mysql命令时总是提示
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
即使修改配置文件socket文件位置,重启MYSQL服务也没有(暂时还不知道为什么)
--------------------------
cmake的重要特性之一是其独立于源码(out-of-source)的编译功能,即编译工作可以在另一个指定的目录中而非源码目录中进行,这可以保证源码目录不受任何一次编译的影响,因此在同一个源码树上可以进行多次不同的编译,如针对于不同平台编译(http://www.linuxidc.com/Linux/2013-08/88664.htm)
--------------------------------------------------------------------
2018-12-28 11:27:26 星期五
centos 6.1 安装 mysql 5.7
5.7 以后由于mysql依赖了 boost 库, 所以必须先安装boost库, 并且在 configure时指定boost的安装目录 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost
参考: http://www.cnblogs.com/galengao/p/5755788.html
安装时遇到 error while loading shared libraries: libatomic.so.1
这样解决: yum install -y libatomic
安装5.7.24 rpm包
遇到: libnuma.so.1()(64bit) is needed by mysql.....
这样解决: yum install -y numactl yum install -y numactl-devel
安装好以后, 先初始化, 初始化后会生成密码, 但是密码在日志中,
命令 rpm -ql mysql.....server....el6.... 可以看到安装的mysql都到了哪些目录中, 查看 /etc/my.cnf 找到日志存放的路径,
打开日志 grep password 找到初始密码, 启动服务, 登录, 重新修改密码: set password='Xm123456@'; 再重新登录
参考: https://www.jianshu.com/p/be16598e6ce5
centos下编译安装mysql5.5/5.6/5.7的更多相关文章
- centos下编译安装mysql5.6
CentOS 6.4下编译安装MySQL 5.6.14 参考:http://www.cnblogs.com/xiongpq/p/3384681.html 概述: CentOS 6.4下通过yum安装的 ...
- centos下编译安装mysql5.5/5.6
2013年11月16日 19:39:13 centos 6 mysql 5.5.28 我只说些我出错的地方: cmake后删除的方法是 xargs rm < install_manifest.t ...
- centos下编译安装lnmp
centos下编译安装lnmp 本文以centos为背景在其中编译安装nginx搭建lnmp环境. 编译安装nginx时,需要事先安装 开发包组"Development Tools" ...
- centos6.7下 编译安装MySQL5.7
centos6.7下编译安装MySQL5.7 准备工作 #-----依赖包及MySQL和boost安装包----- #yum包安装: shell> yum -y install gcc-c++ ...
- 转:在CentOS下编译安装GCC
转:https://teddysun.com/432.html 在CentOS下编译安装GCC 技术 秋水逸冰 发布于: 2015-09-02 更新于: 2015-09-02 6519 次围观 ...
- CentOS6.5_64bit下编译安装MySQL-5.6.23
转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/44785511 ************************************** ...
- CentOS 下编译安装Apache
CentOS 下编译安装Apache 卸载原有的apache 首先从 http://httpd.apache.or 下载apache源码包httpd-2.4.4.tar.gz然后从 http://ap ...
- centos6.6下编译安装mysql5.6之后启动失败:Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).
今天在编译安装mysql5.6时候出现Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysq ...
- CentOS下编译安装MySQL 5.6.21
一.编译安装MySQL前的准备工作 安装编译源码所需的工具和库 yum install gcc gcc-c++ ncurses-devel perl 安装cmake:http://www.cnblog ...
随机推荐
- 几个面试经典算法题Java解答
题目一: public class testClockwiseOutput { //顺时针打印一个矩阵 @Test public void test(){ int[][] num = new int[ ...
- (转)Eclipse配置GitHub代码库(以Windows7为例)
原文地址:http://blog.csdn.net/twlkyao/article/details/26340685 1.安装Git 首先安装git.这里只讲Windows环境下安装Git方法. 从G ...
- SQL语句中 int 溢出 + Asp语句中 Long 溢出
晚上5点多,同事在QQ告诉我,一个用户向他反应,在他登录的时候显示错误信息,我们在管理平台查看该用户的基本信息时,也显示错误信息. 经过初步分析,原来是在执行 SQL语句的时候发生Int溢出: sql ...
- Jenkins-Pipeline 流水线发布部署项目
node { sh 'mkdir -p cms' dir('cms') { git branch: 'prerelease', credentialsId: '5fb79ef0-4301-4b7c-a ...
- springmvc 中@Controller和@RestController的区别
@Controller和@RestController的区别? 官方文档:@RestController is a stereotype annotation that combines @Respo ...
- sklearn多分类问题
sklearn实战-乳腺癌细胞数据挖掘(博主亲自录制视频) https://study.163.com/course/introduction.htm?courseId=1005269003& ...
- 如何在github上下载单个文件
原文链接:https://www.cnblogs.com/zhaoqingqing/p/5534827.html 找到目标文件,打开,会看到raw,右键,目标另存为.ok
- awk词频统计功能
[root@test88 ~]# vim word_freq.sh #!/bin/bash if [ $# -ne 1 ];then echo "Usage: $0 filename&quo ...
- C# 实现线段的编码裁剪算法(vs2010)
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- oracle锁表
一.锁表的处理 Oracle锁表比较简单,查询锁表的session杀掉就可以了. 1.以下几个为相关表 SELECT * FROM V$LOCK; SELECT * FROM V$SQLAREA; S ...