Précédent   Forum des professionnels en informatique > PHP > PHP & SGBD > PHP & MySQL
PHP & MySQL Forum d'entraide sur les fonctions MySQL avec PHP. Avant de poster -> FAQ MySQL, Cours MySQL et Sources MySQL. Pour les questions concernant le moteur MySQL plutôt que les fonctions PHP, merci d'utiliser le forum MySQL.
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 31/01/2012, 15h45   #1
Invité régulier
 
lionel fotso
Inscription : novembre 2009
Messages : 30
Détails du profil
Informations personnelles :
Nom : lionel fotso

Informations forums :
Inscription : novembre 2009
Messages : 30
Points : 6
Points : 6
Par défaut Erreur sur le script d'expportation de la bd

Bjr je souhaite exporter ma bd mais ca donne pas.

Voici mon script :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
//ENTER THE RELEVANT INFO BELOW
$mysqlDatabaseName ='vtigercrm520';
$mysqlUserName ='root';
$mysqlPassword ='';
$mysqlHostName ='localhost';
$mysqlExportPath ='C:/wamp/www/test/vtigerBackup.sql';
 
//DONT EDIT BELOW THIS LINE
//Export the database and output the status to the page
$command='mysqldump --opt -h' .$mysqlHostName .' -u' .$mysqlUserName .' -p' .$mysqlPassword .' ' .$mysqlDatabaseName .' > ~/' .$mysqlExportPath;
exec($command,$output=array(),$worked);
switch($worked){
    case 0:
        echo 'Database <b>' .$mysqlDatabaseName .'</b> successfully exported to <b>~/' .$mysqlExportPath .'</b>';
        break;
    case 1:
        echo 'There was a warning during the export of <b>' .$mysqlDatabaseName .'</b> to <b>~/' .$mysqlExportPath .'</b>';
        break;
    case 2:
        echo 'There was an error during export. Please check your values:<br/><br/><table><tr><td>MySQL Database Name:</td><td><b>' .$mysqlDatabaseName .'</b></td></tr><tr><td>MySQL User Name:</td><td><b>' .$mysqlUserName .'</b></td></tr><tr><td>MySQL Password:</td><td><b>NOTSHOWN</b></td></tr><tr><td>MySQL Host Name:</td><td><b>' .$mysqlHostName .'</b></td></tr></table>';
        break;
}
?>
et ça génère l'erreur :

Citation:
There was a warning during the export of vtigercrm520 to ~/C:/wamp/www/test/vtigerBackup.sql

Comment faire?

Merci
feugana1 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 31/01/2012, 16h19   #2
Membre éclairé
 
Avatar de Nowwis
 
Homme
Développeur Web
Inscription : juin 2009
Messages : 363
Détails du profil
Informations personnelles :
Sexe : Homme
Âge : 21
Localisation : France

Informations professionnelles :
Activité : Développeur Web

Informations forums :
Inscription : juin 2009
Messages : 363
Points : 365
Points : 365
Bonjour,

Il ne manquerait pas un espace dans les options ?

Code :
$command='mysqldump --opt -h ' .$mysqlHostName .' -u ' .$mysqlUserName .' -p ' .$mysqlPassword .' ' .$mysqlDatabaseName .' > ~/' .$mysqlExportPath;
Nowwis est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 07/02/2012, 10h18   #3
Invité régulier
 
lionel fotso
Inscription : novembre 2009
Messages : 30
Détails du profil
Informations personnelles :
Nom : lionel fotso

Informations forums :
Inscription : novembre 2009
Messages : 30
Points : 6
Points : 6
Par défaut Message d'erreurs

J'ai modifié le fichier et voila le message :

Citation:
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

Pourtant j'ai bien defini le chemi dans $mysqlExportPath ='C:/wamp/www/test/vtigerBackup.sql';
feugana1 est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 11h20.


 
 
 
 
Partenaires

Hébergement Web