转自:http://www.jb51.net/article/85218.htm

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY 'mysql' WITH GRANT OPTION; // 使所有的主机都能够访问到自己的数据库