[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Se connecter à une base MySQL en Java avec MM-MySQL



 --- Arnaud Vandyck <arnaud.vandyck@ulg.ac.be> wrote: > "Sebastien
'TiT0' Cazajous" <tito@eikonex.org> wrote:
> 
> > java.sql.SQLException: Cannot connect to MySQL server on 
> > localhost:3306. Is there a MySQL server running on the machine/port
> you 
> > are trying to connect to? (java.net.ConnectException)
> 
> Est-ce   que  MySQL   tourne  bien   sur  cette   machine?..   sur 
> ce
> port?.. Quelle est ta chaine de connexion? 
> 
> jdbc:mysql:localhost:3306/dbname?username=user&password=pass ? 
> 
> Je ne connais plus la  syntaxe par coeur (je travaille maintenant
> avec
> PostgreSQL), mais la chaine de connexion devrait etre indiquee dans
> la
> doc. 
> 
> Sinon, d'apres le  message d'erreur, il n'y a pas  de MySQL qui
> tourne
> sur ce serveur et/ou port
> 
Je ne sais plus si c'est pour MySQL ou bien PostgreSQL (voire les
deux), mais par défaut, la base n'"écoute" que les sockets UNIX. Il
faut ajouter dans la configuration de la base le fait qu'il faille
également écouter sur le port.
Peut-être que la configuration par défaut de la Mandrake inclut
l'écoute du port ...

    François.

=====
Francois BOTTIN
--
    "How kind," the PFY sighs. "But where will I go?" 
    "Somewhere where they know nothing about computing...
where they wouldn't know a RAM chip from a potato chip!" 
    "But I don't want to visit Microsoft!" he whines.
              The BOFH 1998 - Simon Travaglia (bofh.ntk.net)

________________________________________________________________
Nokia 5510 looks weird sounds great. 
Go to http://uk.promotions.yahoo.com/nokia/ discover and win it! 
The competition ends 16 th of December 2001.



Reply to: