Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connecting JSP(resin) to MYSQL with out root

 
Alex Hank
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am able to use this login to access the table "dial" through PHPMyAdmin.

I manage my accounts with PHPMyAdmin, and MySQL Administrator.

thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic