MySQL Forums
Forum List  »  French

Re: fichiers windows ".BAT' et mysql
Posted by: claude Bourgine
Date: August 28, 2015 02:30AM

Ne sachant pas passer de pj je copie directement ici.
1 / le fichier .bat
-----------------
"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysql.exe" "--defaults-file=C:\ProgramData\MySQL\MySQL Server 5.5\my.ini" "-uroot" "-pMonPsw"
SOURCE D:\essais\maketable1.sql;
SOURCE D:\essais\maketable2.sql;
rme etc;
----------------------

2 / le fichier sql ( j'aimerais pouvoir en enchainer plusieurs du meme modele)
----------------------
/*
MySQL Data Transfer
Source Host: localhost
Source Database: test
Target Host: localhost
Target Database: piscine
Date: 27/08/2015 10:47:17
*/

USE test;
SET FOREIGN_KEY_CHECKS=0;
CREATE TABLE If NOT EXISTS t_essai(
`Ch1` int(11) NOT NULL AUTO_INCREMENT,
`horodate` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`Ch2` text,

`Ch3` text,
`Ch4` double DEFAULT NULL,

`Ch5` double DEFAULT NULL,
`ch6` double DEFAULT NULL,
`ch7` double DEFAULT NULL,

PRIMARY KEY (`ch1`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

----------------------------

donc l'idée : me permettre d’enchaîner des fichiers de création de DB.
mais il y a peut être d'autres solutions pour faire la même chose ?
D'avance merci

Options: ReplyQuote


Subject
Views
Written By
Posted
2650
August 26, 2015 05:57AM
Re: fichiers windows ".BAT' et mysql
1462
August 28, 2015 02:30AM
1265
November 04, 2015 10:21AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.