Redian新闻
>
问个关于JDBC和MySQl的问题
avatar
问个关于JDBC和MySQl的问题# Database - 数据库
f*r
1
我的MYSQL server 是装在redhat6.2下.我试图从远程访问. 我是第一次接触JDBC
和mysql.自己想的连接结构是这样的: MySQL server在远端,IP is
137.132.159.221 ; 我在另一台pc上试图访问它.该pc上安装了JDK1.2.2,
MM.MySQL. 我的程序应用MM.MySQL提供的class,MM.MySQL再和JDBC communicate.
JDBC 完成网络连接以及数据库存取等工作. 这样来作,有没有问题?
另外,我用MM.MySQL连接remote MySQL server的时候,出现了这种错误:
SQLException:Invalid authorization specification: Access denied for
user:'[email protected]'(Using passowrd: NO)
SQLState:28000
VendorError:1045
关于建立连接的语句,我是这样写的(实际上是从MM.MySQL的document里抄的,
不该有错:():
Connection C = DriverManage
avatar
m*t
2
The exception shows "Using password: NO", but you said the password
is guest. I guess the last part of the connection string should be
"?user=guest&passwd=guest". Not sure though, check out the document
carefully.

【在 f********r 的大作中提到】
: 我的MYSQL server 是装在redhat6.2下.我试图从远程访问. 我是第一次接触JDBC
: 和mysql.自己想的连接结构是这样的: MySQL server在远端,IP is
: 137.132.159.221 ; 我在另一台pc上试图访问它.该pc上安装了JDK1.2.2,
: MM.MySQL. 我的程序应用MM.MySQL提供的class,MM.MySQL再和JDBC communicate.
: JDBC 完成网络连接以及数据库存取等工作. 这样来作,有没有问题?
: 另外,我用MM.MySQL连接remote MySQL server的时候,出现了这种错误:
: SQLException:Invalid authorization specification: Access denied for
: user:'[email protected]'(Using passowrd: NO)
: SQLState:28000
: VendorError:1045

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。