mysql安装
- 下载数据库(rpm文件)
- 安装软件源 rpm -Uvh mysql57-community-release-el7-10.noarch.rpm
- 安装mysql服务端 yum install -y mysql-community-server
- 修改密码 ALTER USER 'root'@'localhost' IDENTIFIED BY 'ROOT_root123';
- 授权其他机器可登陆
GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY 'ROOT_root123' WITH GRANT OPTION;
FLUSH PRIVILEGES;
安装MySQL出现Job for mysqld.service failed because the control process exited with error code问题
- 删除/var/lib/mysql /后重启MySQL服务就可以了!
用navicat连接数据库报错:1130-host ... is not allowed to connect to this MySql server如何处理
1、连接服务器: mysql -u root -
2、看当前所有数据库:show databases;
3、进入mysql数据库:use mysql;
4、查看mysql数据库中所有的表:show tables;
5、查看user表中的数据:select Host, User,Password from user;
6、修改user表中的Host:update user set Host='%' where User='root';
7、最后刷新一下:flush privileges;
Navicat连接MySQL,出现2059 - authentication plugin 'caching_sha2_password'的解决方案
- use mysql;
- ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'ROOT_root123';