You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Thomas Dudziak <to...@first.fhg.de> on 2004/06/24 15:26:11 UTC
Re: [OT] MySql and JDBC under Linux
J.Braeuchi wrote:
> hi all,
>
> i know the subject is way off topic, but i'm definitely lost . on my
> windows-machine mysql works perfectly and i can also access it from jdbc
> using the url jdbc:mysql://localhost:3306/ojb.
>
> under linux (suse 9.1) i installed mysql and i can used with mysqlcc
> but not with jdbc !?
> the only thing i get is a ConnectionException.
> i'm sure it must be a small detail but i can't find it :(
Do you have TCP/IP connections enabled in the MySQL conf ? Check here:
http://dev.mysql.com/doc/mysql/en/Can_not_connect_to_server.html
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org
Re: [OT] MySql and JDBC under Linux
Posted by Thomas Dudziak <to...@first.fhg.de>.
Jakob Braeuchi wrote:
>hi thomas,
>
>it works now when i use the name of the machine. 'localhost' does not work
>with jdbc, but now i can use mysql to test ojb :)
>
>
Good news :-)
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org
Re: [OT] MySql and JDBC under Linux
Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi thomas,
it works now when i use the name of the machine. 'localhost' does not work
with jdbc, but now i can use mysql to test ojb :)
jakob
Am Do Juni 24 2004 20.14 schrieb Thomas Dudziak:
> Jakob Braeuchi wrote:
> > hi thomas,
> >
> > it works now. i had to substitute localhost by 127.0.0.1
> >
> > jdbc:mysql://127.0.0.1:3306/ojb
> >
> > another strange thing is that i cannot use the machines real ip-addr to
> > connect. it has to be 127.0.0.1
>
> This is probably because you did not grant rights to users from other
> ip's. Here's the doc that explains it in more detail:
>
> http://dev.mysql.com/doc/mysql/en/Connection_access.html
>
> However, I have no idea why localhost does not work where 127.0.0.1
> works. Sounds like a little problem with the network setup ? Does
> localhost work in other contexts, e.g. for Apache, Tomcat or similar ?
>
> Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org
Re: [OT] MySql and JDBC under Linux
Posted by Thomas Dudziak <to...@first.fhg.de>.
Jakob Braeuchi wrote:
> hi thomas,
>
> it works now. i had to substitute localhost by 127.0.0.1
>
> jdbc:mysql://127.0.0.1:3306/ojb
>
> another strange thing is that i cannot use the machines real ip-addr to
> connect. it has to be 127.0.0.1
This is probably because you did not grant rights to users from other
ip's. Here's the doc that explains it in more detail:
http://dev.mysql.com/doc/mysql/en/Connection_access.html
However, I have no idea why localhost does not work where 127.0.0.1
works. Sounds like a little problem with the network setup ? Does
localhost work in other contexts, e.g. for Apache, Tomcat or similar ?
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org
Re: [OT] MySql and JDBC under Linux
Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi thomas,
it works now. i had to substitute localhost by 127.0.0.1
jdbc:mysql://127.0.0.1:3306/ojb
another strange thing is that i cannot use the machines real ip-addr to
connect. it has to be 127.0.0.1
jakob
Am Do Juni 24 2004 16.08 schrieb Thomas Dudziak:
> Jakob Braeuchi wrote:
> >hi thomas,
> >
> >i'm a linux rookie so i simply installed it with default settings. wht
> > puzzles me is that mysqlcc works but jdbc does not.
>
> mysqlcc probably uses Unix Pipes rather than TCP/IP. When used from a
> different machine to connect to your MySQL, it shouldn't work anymore.
> Since you probably used the MySQL package supplied by SUSE, there is the
> possibility that TCP/IP was disabled per default. Check the
> configuration of mysql, should be somewhere in /etc, or the init.d
> script. Also, the rpm tool of SUSE should be able to show you a list of
> installed files for the MySQL package, and where they were installed.
> On my Mandrake 10, I had the same issue with PostgreSQL, though the
> error message was a bit more helpful: it actually told me to check
> whether TCP/IP connections were enabled.
> You might also want to check out the Connector/J doc:
>
> http://dev.mysql.com/doc/connector/j/en/index.html
>
> I'm no MySQL expert myself. I guess I was lucky so far for MySQL simply
> worked (Windows and Linux).
>
> Tom
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org
Re: [OT] MySql and JDBC under Linux
Posted by Thomas Dudziak <to...@first.fhg.de>.
Jakob Braeuchi wrote:
>hi thomas,
>
>i'm a linux rookie so i simply installed it with default settings. wht puzzles
>me is that mysqlcc works but jdbc does not.
>
>
mysqlcc probably uses Unix Pipes rather than TCP/IP. When used from a
different machine to connect to your MySQL, it shouldn't work anymore.
Since you probably used the MySQL package supplied by SUSE, there is the
possibility that TCP/IP was disabled per default. Check the
configuration of mysql, should be somewhere in /etc, or the init.d
script. Also, the rpm tool of SUSE should be able to show you a list of
installed files for the MySQL package, and where they were installed.
On my Mandrake 10, I had the same issue with PostgreSQL, though the
error message was a bit more helpful: it actually told me to check
whether TCP/IP connections were enabled.
You might also want to check out the Connector/J doc:
http://dev.mysql.com/doc/connector/j/en/index.html
I'm no MySQL expert myself. I guess I was lucky so far for MySQL simply
worked (Windows and Linux).
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org
Re: [OT] MySql and JDBC under Linux
Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi thomas,
i'm a linux rookie so i simply installed it with default settings. wht puzzles
me is that mysqlcc works but jdbc does not.
jakob
Am Do Juni 24 2004 15.26 schrieb Thomas Dudziak:
> J.Braeuchi wrote:
> > hi all,
> >
> > i know the subject is way off topic, but i'm definitely lost . on my
> > windows-machine mysql works perfectly and i can also access it from jdbc
> > using the url jdbc:mysql://localhost:3306/ojb.
> >
> > under linux (suse 9.1) i installed mysql and i can used with mysqlcc
> > but not with jdbc !?
> > the only thing i get is a ConnectionException.
> > i'm sure it must be a small detail but i can't find it :(
>
> Do you have TCP/IP connections enabled in the MySQL conf ? Check here:
>
> http://dev.mysql.com/doc/mysql/en/Can_not_connect_to_server.html
>
> Tom
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org