1/1045错误

access denied for user:用户访问被拒绝,新建其他用户代替

端口未开放 、 防火墙未关闭
使用rpm安装错误

使用 rpm -vih xxxxxxxxx --force --nodeps
多次出现以上错误建议使用yum安装
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
sudo yum install mysql-server
sudo chown -R mysql:mysql /var/lib/mysql
mysql -u root
安装mysql-server如果报错

sudo vi mysql-community.repo
找到mysql-56-community 将enable置为0enable=0
禁止root用户远程连接
use mysql
delete from user where user="root" and host="%";

网友评论