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 ...
随机推荐
- hdu3986 spfa+枚举
这题让我第一次感受到了什么叫做在绝望中A题.这题我总共交了18次,TLE不知道几次,WA也不知道几次. 这题不能用dijkstra,用这个我一直超时(我没试过dij+优先队列优化,好像优先队列优化后可 ...
- Lucene 4.7 --高亮显示
jar lucene-analyzers-common-4.7.0.jar lucene-analyzers-smartcn-4.7.0.jar lucene-core-4.7.0.jar lucen ...
- Spring-编程式事物
所谓编程式事务指的是通过编码方式实现事务,即类似于JDBC编程实现事务管理. Spring框架提供一致的事务抽象,因此对于JDBC还是JTA事务都是采用相同的API进行编程. Connection c ...
- POJ1088 滑雪
Description Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激.可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你.Michael想知道 ...
- POJ1364 King
Description Once, in one kingdom, there was a queen and that queen was expecting a baby. The queen p ...
- while练习:输入一个班级的人数,然后依次输入学员成绩,计算班级学员的平均成绩和总成绩。
Console.WriteLine("请输入班级的总人数:"); int count = int.Parse(Console.ReadLine()); ;//声明一个循环变量来记录 ...
- ci中如何私有化方法
私有方法 在某些情况下,你可能想要隐藏一些方法使之无法对外查阅.将方法私有化很简单,只要在方法名字前面加一个下划线("_")做前缀就无法通过 URL 访问到了.例如,如果你有一个像 ...
- Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/dyld_sim is not owned by root.
sudo chown -R root /Applications/Xcode6.1.1.app/ 这里把这个 /Applications/Xcode6.1.1.app/替换成你xocde据在的位置
- mysql 自连接
SELECT语句中的自连接. 到目前为止,我们连接的都是两张不同的表,那么能不能对一张表进行自我连接呢?答案是肯定的. 有没有必要对一张表进行自我连接呢?答案也是肯定的. 表的别名: 一张表可以自我连 ...
- Android打电话&发短信
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView ...