192.168.1.5
NetBeans を使用して Java からMySQL データベース (PC の仮想マシン (Debian) にインストールされ、IP アドレスを持つ) を使用しようとしています。
次のように接続を構成しました。
Driver Name MySQL(Connector/J Driver)
Host 192.168.1.5
Database test
Username root
Password *
JDBC URL jdbc:mysql://192.168.1.5:3306/test
そして、次のエラーが表示されます。
cannot establish a connection to jdbc:mysql://192.168.1.5:3306/test using
com.mysql.jdbc.Driver (Communications link failure The last packet sent successfully
to the server was 0 milliseconds ago. The driver has not received any packets
from the server.)
私mysql.user
のテーブルは次のようになります(% root
あまり安全ではないことはわかっていますが、これは今のところ単純化するためです):
+------------+------------------+
| host | user |
+------------+------------------+
| % | root |
| 127.0.0.1 | root |
| ::1 | root |
| debVirtual | |
| localhost | |
| localhost | debian-sys-maint |
| localhost | phpmyadmin |
| localhost | root |
+------------+------------------+
この接続を許可するにはどうすればよいですか?