ERROR: Can't initialize batch_readline - may be the input source is a directory or a block device

ERROR: Can't initialize batch_readline - may be the input source is a directory or a block device

我有 Mamp Pro。我正在尝试通过命令行导入一个数据库,因为它对于 PHPMyAdmin 来说太大了,使用这些指令:http://nickhardeman.com/308/export-import-large-database-using-mamp-with-terminal/

当我输入以下内容时,系统提示我输入密码:

/applications/MAMP/library/bin/mysql -u root -p DBNAME.sql < /Applications/MAMP/htdocs/FOLDERNAME 

然而,当我输入它时,我收到这条消息:

ERROR: Can't initialize batch_readline - may be the input source is a directory or a block device.

我认为你的命令有问题,应该是:

/applications/MAMP/library/bin/mysql -u root -p DBNAME < /Applications/MAMP/htdocs/FOLDERNAME/BACKUP_FILENAME.sql