Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / January 2004

Tip: Looking for answers? Try searching our database.

Connection Problem JDBC

Thread view: 
Paul L - 28 Dec 2003 17:15 GMT
Hello, All

I installed mysql server on my suse box. I am trying to connect to it
through java jdbc application. The
program does connect to suse server when I run it on localhost. But when I
run this program from outside
it gives me "java.sql.SQLException: Invalid authorization specification,
message from server: "Access
denied for user: 'ttnm@127.0.0.1' (Using password: YES)". Here is how I set
the user table:

+--------------+----------+------------------+
| Host               | User        | Password         |
+--------------+----------+------------------+
| 127.0.0.1      | ttnm | 12c62d5f3ca21044 |
| %                  | ttnm | 12c62d5f3ca21044 |

The % sign should allow user "ttnm" to connect to server from outside I
believe but Access is denied...

Does anyone have any ideas on what I am doing wrong?

Thank you in advance!
Ike - 30 Dec 2003 14:02 GMT
check your connection string...I'll bet you are using 'localhost' in it,
instead of the internet address of your suse box. presently, you musthave it
set to something like "jdbc:mysql://"+server+.." where 'server' is being set
as 'localhost' and you need to set it to the server name on the
network. -Ike

> Hello, All
>
[quoted text clipped - 19 lines]
>
> Thank you in advance!
Paul L - 30 Dec 2003 21:30 GMT
Thanx for suggestion, but no, the server's ip address is correct...

> check your connection string...I'll bet you are using 'localhost' in it,
> instead of the internet address of your suse box. presently, you musthave it
[quoted text clipped - 26 lines]
> >
> > Thank you in advance!
Ike - 02 Jan 2004 13:58 GMT
then you need to check why it thinks you are coming in from 127.0.0.1 -Ike

> Thanx for suggestion, but no, the server's ip address is correct...
>
[quoted text clipped - 31 lines]
> > >
> > > Thank you in advance!
Mark Matthews - 06 Jan 2004 04:30 GMT
> Hello, All
>
[quoted text clipped - 19 lines]
>
> Thank you in advance!

What database are you trying to connect to? The privilege system works
on many levels, it is usually not easy to get it correct by inserting
values into mysql.user or mysql.host...You would be better off adding
the required permissions via the GRANT syntax, for example:

GRANT ALL PRIVILEGES on dbname.* to 'ttnm'@'%' identified by 'my-password'

See http://www.mysql.com/doc/en/Adding_users.html for more information.

Regards,

    -Mark

Signature

Mr. Mark Matthews
MySQL AB, Software Development Manager, J2EE and Windows Platforms
Office: +1 708 557 2388
www.mysql.com

Want to swim with the dolphins? (April 14-16, 2004)
 http://www.mysql.com/uc2004/



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.