mysql添加新用户 开放外网访问
//首先为用户创建一个数据库(phplampDB)
mysql>create database hitalking
//授权hitalk用户拥有hitalking数据库的所有权限。
>grant all privileges on hitalking.* to hitalk@localhost identified by '1234';
//刷新系统权限表
mysql>flush privileges;
mysql>其它操作
/*
如果想指定部分权限给一用户,可以这样来写:
mysql>grant select,update on hitalking.* to hitalk@localhost identified by '1234';
//刷新系统权限表。
mysql>flush privileges;
grant all privileges on *.* to 'yourname'@'%' identified by 'youpasswd';