mysql> grant all privileges on *.* to 'root'@'192.168.61.113'
-> identified by 'root' with grant option;
Query OK, 0 rows affected (0.05 sec)
mysql> select host,user from mysql.user;
+----------------+--------+
| host | user |
+----------------+--------+
| 192.168.61.113 | root |
| localhost | jason |
| localhost | prod |
| localhost | qsrock |
| localhost | radius |
| localhost | root |
+----------------+--------+
关于帐户权限可以参考:http://blog.chinaunix.net/u2/79621/showart_1210771.html
-> identified by 'root' with grant option;
Query OK, 0 rows affected (0.05 sec)
mysql> select host,user from mysql.user;
+----------------+--------+
| host | user |
+----------------+--------+
| 192.168.61.113 | root |
| localhost | jason |
| localhost | prod |
| localhost | qsrock |
| localhost | radius |
| localhost | root |
+----------------+--------+
Class.forName("com.mysql.jdbc.Driver");
Connection conn = DriverManager.getConnection("jdbc:mysql://192.168.61.113:3306/xx", "root", "root");
关于帐户权限可以参考:http://blog.chinaunix.net/u2/79621/showart_1210771.html