在看来MYSQL5.7诸多改进介绍后,决定也安装一个试用下;本文将使用rpm的方式来安装。
环境:
OS: CentOS6.5 x86_64 最小化安装
MEM: 1G
CPU: 1
本文连着上一篇安装GCC5.3之后,新版本的glibc环境需设置到全局环境
|
shell> strings /usr/lib64/libstdc ++.so.6| grep GLIBCXX
shell> rm -f /usr/lib64/libstdc ++.so.6
shell> ln -s /usr/local/lib64/libstdc ++.so.6.0.21 /usr/lib64/libstdc ++.so.6
shell> strings /usr/local/lib64/libstdc ++.so.6.0| grep GLIBCXX
|
2. 更新yum源到最新
shell> yum update
shell> wget
shell> rpm -Uvh mysql57-community-release-el6-7.noarch.rpm
shell> vim /etc/yum .repos.d /mysql-community .repo
|
3. 安装mysql服务
shell> yum install mysql-community-server
shell> service mysqld start
shell> grep "password" /var/log/mysqld .log
2015-12-24T02:12:21.721431Z 1 [Note] A temporary password is generated for root@localhost: s8)9B9)!
2015-12-24T02:12:25.495271Z 0 [Note] Execution of init_file '/var/lib/mysql/install-validate-password-plugin.lv0PNr.sql' started.
2015-12-24T02:12:25.506256Z 0 [Note] Execution of init_file '/var/lib/mysql/install-validate-password-plugin.lv0PNr.sql' ended.
2015-12-24T02:12:27.323654Z 0 [Note] Shutting down plugin 'sha256_password'
2015-12-24T02:12:27.323657Z 0 [Note] Shutting down plugin 'mysql_native_password'
2015-12-24T02:12:29.351753Z 2 [Note] Access denied for user 'UNKNOWN_MYSQL_USER' @ 'localhost' (using password: NO)
shell> mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root: [请在这里输出自动生成的密码,如:s8)9B9)!
shell> mysql -u root -p
shell> find / -name my.cnf
/etc/my .cnf
|
4. 更多配置请到my.cnf中修改
5. 其他
官方文档请查看:
http://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html
本文由 CentOS中文站 - 专注Linux技术 作者:centos 发表,其版权均为 CentOS中文站 - 专注Linux技术 所有,文章内容系作者个人观点,不代表 CentOS中文站 - 专注Linux技术 对观点赞同或支持。如需转载,请注明文章来源。