mysql -uroot -proot -e 'create database mydb;'
MySQL version is
mysql Ver 14.14 Distrib 5.5.14, for Win64 (x86)
When I run the command, it just shows the help information. Please help.
To access a specific database, type the following command at the mysql> prompt, replacing dbname with the name of the database that you want to access: Copy use dbname; Make sure you do not forget the semicolon at the end of the statement. After you access a database, you can run SQL queries, list tables, and so on.
Change your single quotes to double quotes:
mysql -uroot -proot -e "create database mydb;"
I'm running mysql Ver 14.14 Distrib 5.5.16, for Win32 (x86)
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