I am getting the following error while trying to execute this command:
Command:
$(mysql -u root -proot -e 'show databases;') > dbnames
Error:
Database: command not found
$( mysql -u ... )
evaluates to the result of the mysql
command. In this example, that string is then treated as a command to execute, and so equivalent to trying to run
$ Databases > dbnames
Databases: command not found
You simply want to execute the mysql
command:
mysql -u root -proot -e 'show databases;' > dbnames
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.