aspose file tools*
The moose likes JDBC and the fly likes connecting JSP(resin) to MYSQL with out root Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "connecting JSP(resin) to MYSQL with out root" Watch "connecting JSP(resin) to MYSQL with out root" New topic
Author

connecting JSP(resin) to MYSQL with out root

Alex Hank
Greenhorn

Joined: Apr 27, 2005
Posts: 16
my redhat server runs mysql and resin

I have been able to connect my jsp pages to MYSQL with root login and passwork. I created another mysql account (mrdata) to with less priviledges for security reasons.

Now with the new user account mrdata I can not connect to the data base with JSP.

I get the error:

Client does not support authentication protocol requested by server; consider upgrading MySQL client (this does not make sense to me because I was getting the same error when I would try to login to phpmyadmin admin with this login. Then I changed the password to the old password format, and I was able to get into Phpmyadmin, however, I still could not get this login to connect the JSP.)


With the jsp code, I only needed the username and password changed. right? Here is the code:

<%@ page language="java" import="java.sql.*" %>
<%
String db = "dial";

String url="jdbc:mysql-caucho://localhost:3306/" + db;

Class.forName("com.caucho.jdbc.mysql.Driver");

Connection myConn = DriverManager.getConnection(url,"mrdata","rinkerton");
%>

Alex
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
I would verify that user'@'host and user'@'localhost%

has access to the database "dial". Are you using the MySQLClient application or the MySQLAdmin application?
Alex Hank
Greenhorn

Joined: Apr 27, 2005
Posts: 16
I am able to use this login to access the table "dial" through PHPMyAdmin.

I manage my accounts with PHPMyAdmin, and MySQL Administrator.

thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: connecting JSP(resin) to MYSQL with out root
 
Similar Threads
MYSQL error #1045 - Acces denied
Deploying EJB using MySql as a datasource
javax. servlet.Servlet Exception: Initialization failed, Unable to get DB connection
Deploying EJB using MySql as a datasource
problem with j_security_check