linux下安装mysql后Access denied for user 'root'@'localhost' (using password: YES)

日期:2018-05-26 22:50:15 人气:1

linux下安装mysql后Access denied for user 'root'@'localhost' (using password: YES)

mysql 默认的管理员是root 无密码 默认root只能本地登录 直接打mysql 回车 就进去了 添加一个管理员可远程访问mysql数据库的命令 (用户名 mysql 密码123) mysql>grant all privileges on *.* to 'mysql'@'%' identified by '123' with grant option; 别忘了系统的防火墙(centos7) firewall-cmd --
    A+
热门评论