Piping SQL commands from DCL
Posted: Tue Oct 04, 2005 3:10 pm
You can connect to MySQL using
$ mysql -umyacc -pmypwd database
or
$ mysql --user=myacc --password==mypwd database
If you need to execute a file within sql you can use the "source" command:
mysql> source file.sql
Or to pipe directly,
$ pipe mysql -uusername -ppassword database < file.sql
$ mysql -umyacc -pmypwd database
or
$ mysql --user=myacc --password==mypwd database
If you need to execute a file within sql you can use the "source" command:
mysql> source file.sql
Or to pipe directly,
$ pipe mysql -uusername -ppassword database < file.sql