关于客户端连接mysql的授权问题
mysql远程连接 Host * is not allowed to connect to this MySQL server的错误。
是因为mysql需要授权才能访问。授权方式:
授权给某一个ip:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.1.3' IDENTIFIED BY 'root' WITH GRANT OPTION;
授权给所有ip:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
我们习惯用自己的行为准则审视他人,并时刻准备加以指摘。