数据库联接问题
gnod 2003-03-01 03:18:28 假设域名:www.test.com 指向IP为:218.108.0.1
我用getConnection("jdbc:mysql://218.108.0.1/?useUnicode=true&characterEncoding=gb2312","test","test");可以连上,但是用getConnection("jdbc:mysql://www.test.com/?useUnicode=true&characterEncoding=gb2312","test","test");就出现如下错误,请高手指点!谢谢!
class db.DbAccess : java.sql.SQLException: Cannot connect to MySQL server on www.test.com:3306. Is there a MySQL server running on the machine/port you are trying to connect to? (java.net.ConnectException)