1.登陸MySQLphp
mysql -u root -p mysql
2.添加新用戶(容許全部ip訪問)sql
create user
'test'
@
'*'
identified by
'123456'
;(test:用戶名,*:全部ip地址,123456:密碼)
'test'
@
'%'
identified by
'123456'
;
flush
privileges;