Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
尝试执行此命令时出现以下错误:
命令:
$(mysql -u root -proot -e 'show databases;') > dbnames
错误:
Database: command not found
$( mysql -u ... )计算命令的结果。mysql在此示例中,该字符串随后被视为要执行的命令,因此相当于尝试运行
$( mysql -u ... )
mysql
$ Databases > dbnames Databases: command not found
您只需执行以下mysql命令:
mysql -u root -proot -e 'show databases;' > dbnames