centos6 yum安装最新版mysql5.7
来源:互联网 发布:谷嫂淘宝同款 破解版 编辑:程序博客网 时间:2024/06/06 23:01
环境:
OS: CentOS6.5 x86_64 最小化安装
MEM: 1G
CPU: 1
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
# 下载mysql的yum仓库文件
shell> wget
# 安装mysql yum repo
shell> rpm -Uvh mysql57-community-release-el6-7.noarch.rpm
# 或: yum localinstall mysql57-community-release-el6-7.noarch.rpm
# 查看
shell> vim /etc/yum.repos.d/mysql-community.repo # 可以看到里面关于mysql的内容,确保mysql57的enable是打开的状态(1)
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)!#iWJ
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)
## 第一行“root@localhost:”后面的字符就是密码了,我们需要用它来设置我们自己的root登录密码
shell> mysql_secure_installation
## 输出
Securing the MySQL server deployment.
Enter password for user root: [请在这里输出自动生成的密码,如:s8)9B9)!#iWJ]
## 注:密码必须满足1)长度大于8;2)包含至少1个数字,1个大写字母,1个小写字母,1个非字母数字的符号;3)长度不得超过32位。
## 完成后还需要设置一些初始化的配置,请按照提示来做
# 以上步骤结束后,可以使用root用户登录mysql试试了
shell> mysql -u root -p
# mysql的配置文件所在目录
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
- centos6 yum安装最新版mysql5.7
- CentOS6 使用yum来安装mysql5.7
- centos6.5 yum安装mysql5.7
- Centos6.8通过yum安装mysql5.7
- Centos6.8通过yum安装mysql5.7
- Centos6.8通过yum安装mysql5.7
- Centos6.8通过yum安装mysql5.7
- centos6 mysql5.5 yum安装
- 阿里云centos6.7下yum安装nginx最新版
- centos6.8 安装最新版mysql5.7.17
- CentOS6.8 通过yum在线安装MySQL5.7
- centos6.5安装mysql5.5--yum安装
- centos6.5使用yum安装mysql5.6
- centos6.5下yum安装mysql5.5
- yum安装mysql5.7
- Yum 安装 mysql5.7
- Centos6.4下tar包安装最新版Mysql5.6
- CentOS6/7安装MySQL5.7
- (OK)(OK) Android-x86-7.1.1/ kernel 4.4.62
- PHP 短连接生成算法
- 簡單的移动端菜单栏滑屏demo
- 使用fiddler进行genymotion安卓虚拟机手机抓包
- centos 修改时区及NTP时间同步
- centos6 yum安装最新版mysql5.7
- [中国菜刀]用法全解
- git merge 合并分支
- mysql explicit_defaults_for_timestamp参数
- docker 使用教程(2)常用命令
- php中__get()和__set的用法
- kubernates 二次开发
- 通用简写表
- linux下php7安装memcached、redis扩展