mysql -uroot -proot -e 'create database mydb;'
MySQL version
mysql Ver 14.14 Distrib 5.5.14, for Win64 (x86)
When I run the command, it just displays help information. Please, help.
Change your single quotes to double quotes:
mysql -uroot -proot -e "create database mydb;"
I am running mysql Ver 14.14. Distributing 5.5.16 for Win32 (x86)
You can also repeat your sql statement in mysql, for example:
echo "select sum(table_rows) from information_schema.tables" | mysql -uUSR -pPASSWD
Source: https://habr.com/ru/post/1384017/More articles:Sort ps results by start time - sortingHow to execute rsync file in a remote directory that does not exist? - rsyncWhy is this variable still alive? - javascriptKindle API for publishing / downloading e-books? - amazonSpring @Autowired constructor does not give default constructor not found - javaHow to access Android from a browser - javajava printing - setting border size - javaEfficiently getting the number of child records when returning the parent record (s) - sqlHow to find out how much memory is actually used when calling malloc? - cIs it possible to give a class definition in C ++ during allocation, as allowed in java - c ++All Articles