Error 1064 sous Debian (Linux)
stan
-
HostOfSeraphim Messages postés 6750 Date d'inscription Statut Contributeur Dernière intervention -
HostOfSeraphim Messages postés 6750 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour, je tente de créer une base de données pour un projet Boinc sous Debian.
Au lancement du script, j'ai toujours la même erreur :
ERROR 1064 (42000) at line 2: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rpws' at line 1
Merci de m'aider.
Voici le script en Bourne Shell :
#!/bin/sh
pw="rpws";
dbprojectname="cassini";
user="boincadm";
if [ -z "$dbprojectname" ]; then echo "Variable 'dbprojectname' not set";
elif [ -z "$pw" ]; then echo "Variable 'pw' not set";
else
cat << EOMYSQL | mysql -u root -p
DROP DATABASE IF EXISTS $dbprojectname;
CREATE USER $user IDENTIFIED BY $pw;
GRANT ALL PRIVILEGES ON $dbprojectname.* TO $user;
EOMYSQL
fi
Au lancement du script, j'ai toujours la même erreur :
ERROR 1064 (42000) at line 2: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rpws' at line 1
Merci de m'aider.
Voici le script en Bourne Shell :
#!/bin/sh
pw="rpws";
dbprojectname="cassini";
user="boincadm";
if [ -z "$dbprojectname" ]; then echo "Variable 'dbprojectname' not set";
elif [ -z "$pw" ]; then echo "Variable 'pw' not set";
else
cat << EOMYSQL | mysql -u root -p
DROP DATABASE IF EXISTS $dbprojectname;
CREATE USER $user IDENTIFIED BY $pw;
GRANT ALL PRIVILEGES ON $dbprojectname.* TO $user;
EOMYSQL
fi