Going by the list of flags here, with the line at the top about usage: Usage: mysql [OPTIONS] [database]
.
I am running Windows 8; my table is "contact"; I want to create a tee file for source C:/myfile.sql
with the verbose option on.
I have tried mysql -v contact
, -v contact
, --verbose contact
, --verbose source C:/myfile.sql
, and various others.
EDIT: adding screenshot of where I'm trying to run this, in case it helps.
The correct syntax for a verbose interactive session is:
c:\> mysql -u yourUser -p -v yourDatabase
This will launch an interactive session (prompting you for password), and set yourDatabase
as the default database for the session.
Once in this interactive session, issue a tee
command:
mysql> tee c:/temp/my.out
And now you can source your script:
mysql> source c:/myfile.sql
Of course, you can avoid all this pain by simply putting this in your command prompt:
c:\> mysql -u yourUser -pYourPassword -v yourDatabase < myfile.sql > my.out
This will:
myfile.sql
to an "interactive" mysql session... that's essentially a batch processmy.out
Reference:
mysql
CLI: mysql
optionsThat should work, be aware of the db name.
mysql -v contact
If you db requires login:
mysql -v -udbuser -p contact
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With