[Gambas-user] database
Ron
ron at ...1740...
Sat Feb 27 10:46:01 CET 2010
charlesg wrote:
> Hi
>
> Why not something like:
> SHELL "mysql -u root stock < /home/charles/mySQLbackup/stockDump.sql" WAIT
> you could also specify a remote server.
> where stockDump.sql was created by mysqldump.
>
> rgds
>
>
If you want to input the sql password too (ie without any user
interaction) you have to use something else, like this for example:
SHELL "mysql --host=" & sSQLHost & " --user=" & sSQLUser & "
--password=" & sSQLPass & " --execute='SOURCE " & sDumpFile & "'" WAIT
Look here for the complete routine I use to upgrade the database of my
application upon program start:
http://www.domotiga.nl/browser/trunk/DomotiGa/Main.module#L4808
Regards,
Ron_2nd.
More information about the User
mailing list