Bonjour...
J'essai de créer des tables dans Mysql avec un fichier batch et ca ne veut pas fonctionner.
Mon MySQL est de version 5.0.18, installé sur Windows XP Pro
Ma ligne de commande :
ou ceci selon la FAQ sur ce site :
Code : Sélectionner tout - Visualiser dans une fenêtre à part mysql > mysql < books.txt
Dans tous les cas, je recois cette erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part mysql > mysql books < books.txt
Voici ce que contient le fichier books.txt :
Code : Sélectionner tout - Visualiser dans une fenêtre à part ERROR 1064 (42000) : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax tu use near 'mysql books < books.txt' at line 1
Pourquoi est-ce que ca ne veut pas fonctionner ??? Existe-t-il une façon très précise de créer un fichier batch ???
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 create table customers (customerid int unsigned not null auto_increment primary key, name char(50) not null, address char(100) not null, city char(30) not null); create table orders (orderid int unsigned not null auto_increment primary key, customerid int unsigned not null, amount float(6,2), date date not null); create table books (isbn char(13) not null primary key, author char(50), title char(100), price float(4,2)); create table order_items (orderid int unsigned not null, isbn char(13) not null, quantity tinyint unsigned, primary key (orderid, isbn)); create table book_reviews (isbn char(13) not null primary key, review text);
Partager