> -----Message d'origine-----
> De : [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] De la part de 
> Jean-Sébastien Mansart
> Envoyé : mercredi 19 octobre 2005 16:51
> À : [email protected]
> Objet : [Confirme] RE: [Confirme] RE: [Confirme] Probleme 
> d'accès avec MySQL
> 
> > Une requête du genre :
> > 
> > GRANT ALL PRIVILEGES ON databasename.* to users@'127.0.0.1' 
> identified 
> > by 'password'; flush privileges;
> > 
> > Ça doit résoudre ton soucis ...
> 
> Non, ca, ca va encore plus le contraindre à se connecter en local...
> A la place de 127.0.0.1 il faut mettre % comme il avait bien fait...
> 
> par contre, dans le fichier de conf de mysql, il faut 
> regarder si la ligne skipnetworking est commenté ou pas, et 
> en fonction la commenter ou la decommenter...
> (je crois qu'il faut la decommenter...)
> 
> Petit bémol : ca c'était sous debian, et avec les anciennes 
> versions de mysql, sous mandriva, aucune idée, mais bon, ca 
> peut etre un début de piste...
> 
> 
> > 
> > Philippe
> > 
> 
> 
> 
> 

Non hélas ... 
Je sais que sur mes serveurs Fedora, je suis obligé de déclarer 127.0.0.1.
En effet, du à un bug 127.0.0.1 vers localhost n'est pas correctement
résolu.

Tu déclares donc autant d'accès utilisateurs que de possibilités ainsi tu
peux avoir :

GRANT ALL PRIVILEGES ON databasename.* to users@'192.168.100.%' identified
by 'password';
GRANT ALL PRIVILEGES ON databasename.* to users@'127.0.0.1' identified by
'password';
GRANT ALL PRIVILEGES ON databasename.* to [EMAIL PROTECTED] identified by
'password';
...
flush privileges;

C'est dans la doc mysql :

If you specify a hostname when trying to connect, but get an error message
where the hostname is not shown or is an IP number, it means that the MySQL
server got an error when trying to resolve the IP number of the client host
to a name: 

shell> mysqladmin -u root -pxxxx -h some-hostname ver
Access denied for user 'root'@'' (using password: YES)

This indicates a DNS problem. To fix it, execute mysqladmin flush-hosts to
reset the internal DNS hostname cache. See Section 7.5.5, “How MySQL Uses
DNS”. 

Some permanent solutions are: 
Find out what is wrong with your DNS server and fix it. 
Specify IP numbers rather than hostnames in the MySQL grant tables. 
Put an entry for the client machine name in /etc/hosts. 
Start mysqld with the --skip-name-resolve option. 
Start mysqld with the --skip-host-cache option. 
On Unix, if you are running the server and the client on the same machine,
connect to localhost. Unix connections to localhost use a Unix socket file
rather than TCP/IP

...

http://dev.mysql.com/doc/refman/4.1/en/access-denied.html


Bien à vous,
Philippe


____________________________________________________
Want to buy your Pack or Services from Mandriva? 
Go to http://store.mandriva.com
Join the Club : http://www.mandrivaclub.com
____________________________________________________

Répondre à