Run script on connection
From Help > Readme:
*** Command line switches
Although HeidiSQL is a pure GUI application, it can be automated for connecting
and opening files via command line parameters. Parameter names are case sensitive
and are based on those used by the MySQL command line applications, e.g. mysqldump.
-d, -description Session name
-h, -host Host name
-u, -user User name
-p, -password Password
-P, -port Port (defaults to 3306 if not given)
-S, -socket Socket name (for connecting via named pipe)
Examples:
* Start over using stored settings from session "xyz":
c:\path\to\heidisql.exe -d=xyz
c:\path\to\heidisql.exe -description=xyz
* Connect with different username or port:
c:\path\to\heidisql.exe -d=xyz -u=OtherUser
c:\path\to\heidisql.exe -d=xyz -P=3307
* Connect to a non-stored session:
c:\path\to\heidisql.exe -h=localhost -u=root -p=Mypass -P=3307
* Open multiple .sql files in query tabs:
c:\path\to\heidisql.exe fileA.sql path\to\fileB.sql fileC.sql ...
TRUNCATE TABLE `availability`;
LOAD DATA LOCAL INFILE 'C:\\EXPORT.CSV' INTO TABLE `availability`
FIELDS TERMINATED BY ';' ENCLOSED BY '"' ESCAPED BY '\\'
LINES TERMINATED BY '\r\n'
In MySQL-Front this can be put into a start-up property for a specific session.
Maybe i can add some missing things to HeidiSQL to make it easier for you to migrate. At least the above mentioned startup script feature sounds nice somehow. Could live in the session manager dialog. Request it as a new feature?
Please login to leave a reply, or register at first.