安装虚拟机和数据库部分报错解决(CentOS7)
1251- Client does not support authentication protocol requested by serverfinalshell 连接主机java.net.ConnectException: Connection timed out: connect依赖检测失败/usr/bin/perlperl(Getopt::Long)perl(strict) 被xxxxx
安装虚拟机和数据库部分报错解决(CentOS7)
Mysql:1251- Client does not support authentication protocol requested by server…的问题
解决办法:
ALTER USER ‘root’@‘%’ IDENTIFIED WITH mysql_native_password BY ‘123456’; #更新user为root,host为% 的密码为123456
或者
ALTER USER ‘root’@‘%’ IDENTIFIED BY ‘password’ PASSWORD EXPIRE NEVER; #修改加密规则
ALTER USER ‘root’@‘%’ IDENTIFIED WITH mysql_native_password BY ‘password’; #更新一下用户的密码
FLUSH PRIVILEGES; #刷新权限
安装数据库:
错误:依赖检测失败:
/usr/bin/perl 被 mysql-community-server-xxxxxxx.x86_64 需要
perl(Getopt::Long) 被 mysql-community-xxxxxxx.x86_64 需要
perl(strict) 被 mysql-community-server-xxxxxxx.x86_64 需要
解决:
yum install net-tools
yum install -y perl-Module-Install.noarch
yum install -y perl-Module-Install.noarch
报错:Error downloading packages:
glibc-common-xxxxxxx.x86_64: [Errno 256] No more mirrors to try.
解决办法:
cd /etc/yum.repos.d/
rm -rf *.repo
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
远程授权:
ERROR 1410 (42000): You are not allowed to create a user with GRANT
解决办法:
update user set host=‘%’ where user=‘root’;
ERROR 1396 (HY000): Operation CREATE USER failed for ‘root’@’%’
解决办法:
drop user root@‘%’;#删除用户
flush privileges;#刷新权限
再次创建
远程连接数据库:
2003-Can’t connect to MySql server on ‘localhost’(10038)
解决办法:查看数据库状态
systemctl status mysql #查看数据库状态
systemctl restart mysql #重启数据库
查看防火墙是否关闭,没有关闭,直接关闭防火墙
systemctl stop firewalld
关闭 ‘开机重启防火墙’
systemctl disabled firewalld
Linux:finalshell 连接主机java.net.ConnectException: Connection timed out: connect
解决:
systemctl stop firewalld #关闭防火墙,systemctl stop NetworkManager
IP地址前三位与网关地址前三位保持相同 如:192.168.109.xxx 192.168.109.xxx(搭建虚拟机时更改过IP,改回IP地址前三位与网关地址前三位保持相同后就能连接了)
更多推荐
所有评论(0)