首先查看服务器先能看到的数据库
show databases;
2. 在数据库的机子上查看此数据库用户和对应ip情况
select host,user from mysql.user;
3.在远程登录的机子上查看当前登录数据库的用户信息
select current_user();
4. 在数据库主机查看当前用户权限
show grants from current_user();授予权限
grant all privileges on . to ‘haha’@’%’ identified by ‘password’ with grant option;
