Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Posts
    28

    Unanswered: which username where?

    Hello!

    I'm a little confused..I have a Mysql-server and running a JSP-solution.
    It works perfectly when it runs locally but when I export my JSP+Msql application to my webhotel nothing is working, I get this error.

    -------------------ERROR------------------------------
    java.sql.SQLException: Invalid authorization specification, message from server: "Access denied for user: 'bla1@localhost' (Using password: YES)
    ---------------------------------------------------------

    My mysql setup for the moment is:
    Mysqlserver:
    username: root
    passw:"" (blank)

    My database
    username: bla1
    passw: bla2

    When I connect to my database I use this information:

    String fileURL = "jdbc:mysql://myurltowebhost/division?user=" + username + "&password=" + passw;

    Connection con2 = DriverManager.getConnection(fileURL, "", "");

    In " DriverManager.getConnection(fileURL, "", "")" there should be sent password and username "(fileURL, "usernameX", "passwordX")" ... which one should be send... database?mysqlserver?

    Thanks in advance // D_S
    Last edited by digital_storm; 04-15-04 at 14:53.

  2. #2
    Join Date
    Mar 2004
    Posts
    480

    Re: which username where?

    You need to use the log in name that is associated to the specific database if you are only limiting that one user to that one database.

    You should also have a password for root.

    Right now the error message below is saying you are using the wrong password for that user.


    -------------------ERROR------------------------------
    java.sql.SQLException: Invalid authorization specification, message from server: "Access denied for user: 'bla1@localhost' (Using password: YES)
    ---------------------------------------------------------

    My mysql setup for the moment is:
    Mysqlserver:
    username: root
    passw:"" (blank)

    My database
    username: bla1
    passw: bla2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •