跨平台导入MySQL数据时出错(从MAMP到WIMP) [英] Error importing MySQL data across platforms (MAMP to WIMP)

查看:69
本文介绍了跨平台导入MySQL数据时出错(从MAMP到WIMP)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将本地MAMP服务器上的MySQL数据库转储到.sql文件中.通常,对于我而言,将文件轻松导入生产Linux服务器足够容易.但是,我当前的客户端在WIMP上运行MySQL,将MAMP生成的.sql转储导入到WIMP mysql环境中(使用pphpMyAdmin)时,出现无法读取文件"错误吗?

I've dumped a MySQL database I have on my local MAMP server into a .sql file. Usually, it's easy enough for me to import that file to my production Linux servers without a hitch. However, my current client runs MySQL on WIMP, and when import the MAMP-generated .sql dump into my WIMP mysql environment (Using pphpMyAdmin) I get a "File could not be read" error?

关于我遇到什么挑战或需要检查什么的任何想法?谢谢-

Any ideas of what I'm bumping up against, or what to check? Thanks-

我最初的解释不清楚-我正在尝试从MAMP中导出,然后导入到WIMP

My initial explanation was unclear- I'm trying to export out of MAMP, and import into WIMP

推荐答案

此问题的最可能原因是DOS和UNIX平台上的行结束符不同. Windows使用DOS约定'\ r \ n'换行,而Mac OSX和Linux使用UNIX约定'\ n'换行.要解决此问题,请在Mac上的mysql转储文件上运行unix2dos实用程序,然后将该文件复制到Windows框中.

The most likely cause for this problem is the different end of line conventions on DOS and UNIX platforms. Windows uses the DOS convention of '\r\n' for newlines, while Mac OSX and Linux use the UNIX convention of '\n' for newlines. To fix the problem, run the unix2dos utility on the mysql dump file on your Mac and then copy the file to your Windows box.

这篇关于跨平台导入MySQL数据时出错(从MAMP到WIMP)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆