【mysql】 mysql备份还原时发生异常:导入mysql文件提示“ASCII '\0' appeared in the statement”
2017-11-10 13:55
639 查看
小Z今天在备份还原Mysql数据库,出现了 导入mysql文件提示“ASCII '\0' appeared in the statement” ,并不意味着我的sql文件中包含ASCII字符。
原来小Z是通过powershell进行的还原,换成在cmd中运行命令则成功。
BTW:
备份命令在cmd中使用,在mysql command line client中使用会发生异常,该做法是不正确的。
备份命令:mysqldump -h [ip地址] -P [端口号] -u [用户名] -p [数据库] > [sql脚本文件]
注意端口号命令P小写
还原命令:mysql -h [ip地址] -P [端口号] -u [用户名] -p [数据库] < [sql脚本文件]
原来小Z是通过powershell进行的还原,换成在cmd中运行命令则成功。
BTW:
备份命令在cmd中使用,在mysql command line client中使用会发生异常,该做法是不正确的。
备份命令:mysqldump -h [ip地址] -P [端口号] -u [用户名] -p [数据库] > [sql脚本文件]
注意端口号命令P小写
还原命令:mysql -h [ip地址] -P [端口号] -u [用户名] -p [数据库] < [sql脚本文件]
相关文章推荐
- 导入mysql文件提示“ASCII '\0' appeared in the statement”
- mysql导入sql文件、数据库时报错ERROR: ASCII '\0' appeared in the statement
- window环境下mysql导入sql文件时报错:ERROR: ASCII '\0' appeared in the statement
- SSH 文件下载发生异常: Can not find a java.io.InputStream with the name [inputStream] in the invocation sta
- OleDbConnection打开xls文件发生“External table is not in the expected format.”异常
- 导入xlsx文件提示:The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine
- Windows下MySQL导入csv文件ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv opti
- 解决Eclipse导入项目是提示错误:Some projects cannot be imported because they already exist in the workspace
- Myeclipse导入项目提示已存在(Some projects cannot be imported because they already exist in the workspace)
- MyEclipse导入失败,提示Some projects cannot be imported because they already exist in the workspace
- eclipse导入项目提示已存在(Some projects cannot be imported because they already exist in the workspace)
- csv导入mysql提示错误[Error Code] 1290 - The MySQL server is running with the --secure-file-priv option 解决方
- mysql创建触发器错误提示:Can not update in stored function/trigger already used by statement invoked
- 上传导入文件时报这个错误 There is a cycle in the hierarchy!
- csv导入mysql提示错误[Error Code] 1290 - The MySQL server is running with the --secure-file-priv option 解决方法【转】
- mysql导入sql数据库提示。您可能正在上传很大的文件,请参考文档来寻找解决方法
- mysql 警告提示Unsafe statement .The statement is unsafe because it uses a LIMIT clause
- mysql提示错误#42000You have an error in your SQL syntax; check the manual that corresponds
- 使用3dmax 9.0导入Illustrator 文件时提示"Line in file exceeds 255 characters"
- MySQL导入备份文件发生错误 SQL 1153