mysql安装及错误解决
#下载mysql源安装包
shell> wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
# 安装mysql源
shell> yum localinstall mysql57-community-release-el7-8.noarch.rpm
检查mysql源是否安装成功
shell> yum repolist enabled | grep "mysql.*-community.*"
安装MySQL
shell> yum install mysql-community-server
开机启动
shell> systemctl enable mysqld
shell> systemctl daemon-reload
/etc/my.cnf 新增如下三行
character_set_server=utf8
init_connect='SET NAMES utf8'
validate_password = off 密码策略失效
常用命令:
shell> systemctl start mysqld
systemctl stop mysqld
systemctl restart mysqld
systemctl status mysqld
首次登录
mysql -uroot -p
密码使用如下查找到的_ZfwDGlsd0=g
[root@localhost /]# grep 'temporary password' /var/log/mysqld.log
2018-05-21T11:55:15.515167Z 1 [Note] A temporary password is generated for root@localhost: _ZfwDGlsd0=g
修改用户名密码
ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';
显示字符集
show variables like '%character%';
修改密码
mysqladmin -uroot -pMyNewPass4! password a123456
//创建用户
CREATE USER 'abc'@'host' IDENTIFIED BY 'abc123456';
//刷新系统权限表
flush privileges;
查看启动日志
cd /var/log/mysql.log
用navicat for mysql连接
报错:1130 host is not allowed to connect to
解决办法,执行如下命令:
mysql -uroot -p
mysql>use mysql;
mysql>update user set host = '%' where user = 'root';
mysql>select host, user from user;
mysql>flush privileges;
mysql卸载
查看安装的内容 rpm -qa |grep -i mysql

卸载 yum remove mysql-community mysql-community-server mysql-community-libs mysql-community-common
检查是否卸载干净 rpm -qa |grep -i mysql

继续卸载 yum remove mysql-community-release
mysql安装及错误解决的更多相关文章
- MySQL安装常见错误及解决方案
错误1:wizard安装最后一页,出现cannot create Windows service for mysql.error:0 错误 解决方法:打开命令行 输入 sc delete mysql ...
- 2016最新CocoaPods安装和错误解决 + 自己的经验
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 20.0px Times; color: #333333; background-color: #fffff ...
- Linux 下一个 Mysql error 2002 错误解决
Linux 下一个 Mysql error 2002 错误解决 首先查看 /etc/rc.d/init.d/mysqld status 查看mysql它已开始. 假设启动的的话,先将数 ...
- 安装Mysql提示1045错误解决方法
MySQL安装提示一下错误 The security settings could not be applied to the database because the connection has ...
- MySQL ERROR 1045错误解决办法
今天在安装MySQL数据库时,有安装过程中报ERROR 1045错误,网上查了一下,解决方法如下: 1.对于安装过程中该错选择"skip"继续向下安装,完成安装: 2.在MySQL ...
- linux apache+php+mysql安装及乱码解决办法
1.乱码解决方法 首先确认mysql数据库字符集设置正确,php页面字符设置正确,之后修改apache配制文件http.conf 注释掉以下字符 AddDefaultCharset UTF-8 此为乱 ...
- setuptools安装和错误解决
错误解决:ImportError No module named setuptools GitHub: https://github.com/pypa/setuptools 下载安装 wget htt ...
- MySQL的1067错误解决方法
今天在学校的时候MySQL还运行的好好的,关机来公司后MySQL一直报错,错误为1067,网上找了好多办法,但是大都没效果,因此对这个错误做个总结: 打开你的安装目录下,查看my.ini文件中MySQ ...
- redis 安装 与错误解决办法
redis 安装与安装中遇到的错误 redis 安装 wget http://download.redis.io/releases/redis-4.0.11.tar.gz .tar.gz cd red ...
随机推荐
- Android插件化
http://www.androidblog.cn/index.php/Index/detail/id/16# Android Hotfix 新方案——Amigo 源码解读 https://www.d ...
- volatile关键值
happens-before原则 我们编写的程序都要经过优化后(编译器和处理器会对我们的程序进行优化以提高运行效率)才会被运行,优化分为很多种,其中有一种优化叫做重排序,重排序需要遵守happens- ...
- mysql count(*) vs count(1)
perfer count(*) 官方文档: _InnoDB handles SELECT COUNT(*) and SELECT COUNT(1) operations in the same way ...
- HTML DOM 知识点整理(一)—— Document对象
一.DOM对象 DOM对象整体包括: HTML DOM Document对象 HTML DOM 元素对象 HTML DOM 属性对象 HTML DOM 事件对象 HTML DOM Console 对象 ...
- Oracle中Merge的使用
MERGE INTO products p USING product_changes pc ON (p.product_id = pc.product_id) WHEN MATCHED THEN - ...
- HttpWatch HttpWatch时间表(HttpWatch Time Charts)
HttpWatch时间表(HttpWatch Time Charts) by:授客 QQ:1033553122 截图 说明 页面事件线(Page Event Lines)
- Android系统定制和源码开发以及源码编译(附视频)
Android系统定制配套视频: 为了把Android系统源码定制和编译的课程讲完,从准备到录制完所有的视频,一共花去了近半年的时间,前前后后各种下载源码,编译源码,系统不兼容,版本适配,虚拟机配置困 ...
- LeetCode题解之 Convert Sorted Array to Binary Search Tree
1.题目描述 2.问题分析 使用二分法即可. 3.代码 TreeNode* sortedArrayToBST(vector<int>& nums) { ) return NULL; ...
- COCOMOII
一.COCOMOII是什么 cocomo是 COnstructive COst MOdel(建设性成本估算模型)的缩写.最早是由Dr. Barry Boehm在1981年提出.是一种精确的.易于使用的 ...
- Prometheus Node_exporter 之 System Detail
System Detail 1. Context Switches / Interrupts type: GraphUnit: shortLabel: CounterContext switches ...