If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > which username where?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-15-04, 12:39
digital_storm digital_storm is offline
Registered User
 
Join Date: Dec 2003
Posts: 28
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 13:53.
Reply With Quote
  #2 (permalink)  
Old 04-15-04, 18:27
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
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.

Quote:

-------------------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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On