Problème Connexion SQL

jobertomeu Messages postés 1289 Statut Membre -  
jobertomeu Messages postés 1289 Statut Membre -
Bonjour,
je suis débutant en base de donnée SQL et je voulais savoir comment me connecter chez mon hebergeur qui est olympe-network.
j'arrive a créer une table etc... en local avec phpmyadmin, en localhostmais je n'arrive pas a le faire "en ligne".

voici mon morceau de code :

<?php

$int = $_POST['int'];
$titre = $_POST['titre'];
$in = $_POST['in'];

mysql_connect("sql.olympe-network.com", "visualphphtml", "");
mysql_select_db("visualphphtml");

mysql_query("INSERT INTO news VALUES($int, $titre, $in)");

mysql_close();
echo $titre;
echo $in;
echo$int;
?>


et voila ce qu'il me dit :

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /www/visualphphtml/admin/news.php on line 3

Warning: mysql_select_db() [function.mysql-select-db]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /www/visualphphtml/admin/news.php on line 4

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /www/visualphphtml/admin/news.php on line 4

Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /www/visualphphtml/admin/news.php on line 11

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /www/visualphphtml/admin/news.php on line 11

Warning: mysql_close(): no MySQL-Link resource supplied in /www/visualphphtml/admin/news.php on line 13

Mercid de votre aide, je suis un grand débutant !!
donc, soyez indulgent ;-)

1 réponse

jobertomeu Messages postés 1289 Statut Membre 86
 
Il n'y a personne ? s'il vous plaît ! aidez moi, c'est un exam !
0