mysql 数据库默认是不支持远程连接的,需要授权。
grant all privileges on *.* to 'user'@'%' identified by '123456' with grant option;
创建新用户,并授予远程登录权限。
当将'user'@'%' 改为 'user'@'localhost' 时,意思是创建新用户,只能本地登录
mysql 数据库默认是不支持远程连接的,需要授权。
grant all privileges on *.* to 'user'@'%' identified by '123456' with grant option;
创建新用户,并授予远程登录权限。
当将'user'@'%' 改为 'user'@'localhost' 时,意思是创建新用户,只能本地登录