问题:
mysql远程创建database错误Access denied for user ... to database ...
解决:
#mysql -u root -p
>show databases;
> use mysql;
> select host, user from user;
>grant all privileges on database.* to 'sa'@'%' identified by 'password' with grant option;
上面这是授权某个database
>grant all privileges on *.* to 'sa'@'%' identified by 'password' with grant option;
上面这是授权所有database
>flush privileges;
>exit;vi /etc/mysql/my.cnf
#bind-address= 127.0.0.1
bind-address=0.0.0.0
service mysql restart