Hi,

Try giving the command in mysql


$> mysql mydb

mysql> grant all privileges on mydb.* to root;

where mydb is the name of the database you are trying to connect.


Cheers
Vinay



jsp_programmer wrote:
>
> JSP-INTEREST�����ã�
>
> when I use mm.mysql jdbc driver to connect ot mysql,
> it can't connected successful.
> The browers tell me the msg follow:
>
> SQLException: Server configuration denies access to data source SQLState:���� 08001 
>VendorError:��0
>
> I really don't know why.
> Could you help me?
>
> I use mysql-3.22.32 server and tomcat 3.1 and jdk 1.2.2 ,mm.mysql2.0.1 on redhat 6.1.
> The test code is:
> (ps: the connect accont can use bye mysql_client and other problem)
> /********************************************************************/
> <%@ page import="java.sql.*" %>
> <%
> try {
> Class.forName("org.gjt.mm.mysql.Driver").newInstance();
> }
> catch (Exception E) {
> out.println("Unable to load driver.");
> }
> try{
> Connection C = 
>DriverManager.getConnection("jdbc:mysql://localhost/mysql?user=root&password=123456");
> Statement s=C.createStatement();
> ResultSet rs=s.executeQuery("select * from user");
> rs.close();
> s.close();
> C.close();
> }
> catch (SQLException E) {
> out.println("SQLException: " + E.getMessage());
> }
> %>
>
>                     ��
> ��
>
>             jsp_programmer
>             [EMAIL PROTECTED]
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

--

____________________________________________________________________

  ('>                                            Vinay Pai
  //\                                            (91 22 5775395)
  v_/_                                           [EMAIL PROTECTED]

Parkinson's Law of the Telephone
The effectiveness of a telephone conversation is in inverse proportion
to the time spent on it.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to