阿里云安装Mysql5.7 实录
来源:互联网 发布:mac book怎么样 编辑:程序博客网 时间:2024/05/19 05:34
安装就不陈述了。
添加yum源,然后yum安装。
安装成功后启动Mysql并且添加为开机启动
systemctl start mysqldsystemctl enable mysqldsystemctl daemon-reload
安装后密码是随机的。然后找出密码的方法为:
cat /var/log/mysqld.log | grep password2017-11-15T08:47:07.211029Z 1 [Note] A temporary password is generated for root@localhost: xtkfzehfx7,E2017-11-15T09:01:06.111230Z 0 [Note] Shutting down plugin 'validate_password'2017-11-15T09:01:07.928241Z 0 [Note] Shutting down plugin 'sha256_password'2017-11-15T09:01:07.928243Z 0 [Note] Shutting down plugin 'mysql_native_password'
xtkfzehfx7,E就是密码,随机生成的。下一步登录mysql 修改密码。或者使用mysqld_safe --skip-grant-table
跳过权限检查再修改数据(记不起详细代码了,见手册)
alter user 'root'@'localhost'identified by '新密码'
- 设置远程登录
首先打开阿里云的端口
修改mysql权限系统
grant all PRIVILEGES on *.* to 'root'@'%' identified by '新密码' with grant option;
- 修改默认字符集
安装的mysql的默认字符集是拉丁文,需要修改配置文件
vi /etc/my.cnf在配置文件中[mysqld]后面添加character_set_server=utf8init_connect='SET NAMES utf8'然后重启sysytemctl restart mysqld如果有报错sysytemctl status mysql查看报错信息,因为刚改了配置,所以一般都是刚才的配置哪里写错了
阅读全文
0 0
- 阿里云安装Mysql5.7 实录
- mysql5.7 阿里云安装部署
- 阿里云安装mysql
- 阿里云安装docker
- 阿里云安装体验
- 阿里云安装SVN
- 阿里云安装jdk
- 阿里云安装tomcat
- 阿里云安装redis
- 阿里云安装mysql
- 阿里云安装VPN (pptp)
- 阿里云安装VPN (pptp)
- 阿里云安装certbot-auto
- 阿里云安装搭建gogs
- 阿里云安装MySQL总结
- 阿里云安装wamp时出错
- 堡垒机阿里云安装包安装
- 堡垒机阿里云安装包安装
- 《投资买房策略》项目分析报告
- Beta 函 數和 Gamma 函 數 的 關 係
- 窗口
- 动画——视图动画(View Animation)
- 进制之间的简单转换
- 阿里云安装Mysql5.7 实录
- ES6-数组的扩展-Array.from()
- SPRING AOP的使用
- Java安全体系结构
- libcef 最新下载地址
- CentOS6.5 下安装Python3.6
- PHP通过CURL模拟登录并获取数据
- html视频标签属性
- 图形用户界面按钮布局