简体   繁体   English

Win 7 - Tomcat 无法连接到 MySQL

[英]Win 7 - Tomcat unable connect to MySQL

I moved our code (web programming) to Win 7 from Win XP.我将我们的代码(网络编程)从 Win XP 移到了 Win 7。 All the thing were nearly the same, Old System (It works for few years) Win XP / Tomcat 5.5 / MySQL 5.0 / MySQL Adminstrator & Query Brower / JDBC 5.0 All the thing were nearly the same, Old System (It works for few years) Win XP / Tomcat 5.5 / MySQL 5.0 / MySQL Adminstrator & Query Brower / JDBC 5.0

New System Win 7 / Tomcat 5.5 / MySQL 5.5 / Workbench CE 5.2 / JDBC 5.0新系统 Win 7 / Tomcat 5.5 / MySQL 5.5 / 工作台 CE 5.2 / JDBC 5.0

Using Workbench to create user without password same as old one, but I got the below error, Access denied for user 'jytsd'@'localhost' (using password: NO)使用 Workbench 创建与旧密码相同的用户,但出现以下错误,用户 'jytsd'@'localhost' 的访问被拒绝(使用密码:否)

I has checked many times about the user info, but found nothing.我已经检查了很多次有关用户信息的信息,但一无所获。 Could anyone tell me what's wrong here?谁能告诉我这里有什么问题?

Yes, don't connect that way.是的,不要那样连接。 Use the type IV JDBC connector for MySQL.对 MySQL 使用 IV 型 JDBC 连接器。 Put it in the Tomcat 7 /lib directory and configure your data source and JNDI lookup like this:将它放在 Tomcat 7 /lib 目录中,并像这样配置您的数据源和 JNDI 查找:

http://tomcat.apache.org/tomcat-7.0-doc/jndi-datasource-examples-howto.html http://tomcat.apache.org/tomcat-7.0-doc/jndi-datasource-examples-howto.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM