centos下编译安装mysql5.5/5.6
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的更多相关文章
- 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/5.7
2018-12-28 14:38:46 星期五 centos 系统在mysql官网, 按照教程去配置yum源, 然后安装, 不用自己找依赖了: https://dev.mysql.com/doc/my ...
- 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 ...
随机推荐
- struts2面试题汇总
一.工作原理 一个请求在Struts2框架中的处理大概分为以下几个步骤 1 客户端初始化一个指向Servlet容器(例如Tomcat)的请求 2 这个请求经过一系列的过滤器(Filter)(这些过滤器 ...
- Spring AOP详解 、 JDK动态代理、CGLib动态代理
AOP是Aspect Oriented Programing的简称,面向切面编程.AOP适合于那些具有横切逻辑的应用:如性能监测,访问控制,事务管理以及日志记录.AOP将这些分散在各个业务逻辑中的代码 ...
- WDCP(WDlinux Control Panel) mysql/add_user.php、mysql/add_db.php Authentication Loss
目录 . 漏洞描述 . 漏洞触发条件 . 漏洞影响范围 . 漏洞代码分析 . 防御方法 . 攻防思考 1. 漏洞描述 http://www.wooyun.org/bugs/wooyun-2010-06 ...
- Codeforces 295A Greg and Array
传送门 A. Greg and Array time limit per test 1.5 seconds memory limit per test 256 megabytes input stan ...
- eclipse中python文本字体大小设置
eclipse中python脚本用默认的字体和大小,注释是中文的也看不清楚,改一下字体吧 windows-preferences-python-editor-colors and fonts 其实上一 ...
- IOS基础之 (二) 面向对象思想
编写Objective-C程序时,要使用Foundation框架. 什么是框架? 框架(framework)是由很多类(class)组成的库,可以用来编写程序. 对象(Object) 对象可以保存数据 ...
- HDU2196computer(树上最远距离 + DP)
Computer Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Su ...
- POJ1753Flip Game(DFS + 枚举)
Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 37050 Accepted: 16122 Descr ...
- 浅谈php对api开发的作用
最近正在做一个手机APP的服务端API开发,虽然是基于Ruby on Rails的,做的也不太专业,不过大致相通,希望能够给你一些启发. 首先,如果是比较简单的手机APP,例如新闻客户端这样的不会涉及 ...
- Sphinx学习之sphinx的安装篇
一. Sphinx简介 Sphinx是由俄罗斯人Andrew Aksyonoff开发的一个全文检索引擎.意图为其他应用提供高速.低空间占用.高结果 相关度的全文搜索功能.Sphinx可以非常容易的与 ...