Running scripts using 'source' from MySQL commandline

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
mjseaden
Forum Contributor
Posts: 458
Joined: Wed Mar 17, 2004 5:49 am

Running scripts using 'source' from MySQL commandline

Post by mjseaden »

Hi,

The MySQL manual says that I should place a script in the 'home directory', and use the 'source' command 'source %s.sql' from the MySQL commandline to execute the script.

It doesn't say where the 'home directory' is, where should I place my script? The root directory of my MySQL install is C:\MySQL5

Many thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Try stuff.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Sounds like unix/linux . Where in the manual did you find this?
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

I just stick them in C:\ and then use source c:/myscript.sql; in the client. I never bother with all that home directory stuff.
Post Reply