MySQL

From Hugo Villeneuve
Revision as of 20:10, 11 September 2008 by Hugo (talk | contribs)
Jump to: navigation, search

Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (13)

Le code d'erreur 13 signifie "Permission denied".

Si ce messagge d'erreur survient dans un script PHP éxécuté sous Apache,

<?php $connection = mysql_connect('localhost', 'user', 'password', 'database');

if (mysql_errno()) {

 printf("Connection failed: %s\n", mysql_error());

} else {

 printf("Connection succeeded\n");

} ?>