MySQL: Difference between revisions

From hugovil.com
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
= Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (13) =
= 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");
}
?>

Revision as of 00:10, 12 September 2008

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");

} ?>