我正在尝试将city .sql文件导入到我的表中。
我正在使用这个github存储库: https://github.com/JoshSmith/worldwide-city-database
我创建了表,就像它在存储库中所说的那样, 但是当涉及到导入cities.sql时,我收到了一个错误。
Cannot launch AVD in emulator.
Output:
libGL error: unable to load driver: radeonsi_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: radeonsi
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 49
Current serial number in output stream: 48
libGL error: unable to load driver: radeonsi_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: radeonsi
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 49
Current serial number in output stream: 48
libGL error: unable to load driver: radeonsi_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: radeonsi
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Value in failed request: 0x0
Serial number of failed request: 33
Current serial number in output stream: 34
QObject::~QObject: Timers cannot be stopped from another thread
emulator: WARNING: VM heap size set below hardware specified minimum of 128MB
emulator: WARNING: Setting VM heap size to 384MB
我也有一张照片:
我提到我正在使用Mac,已经阅读了所有解决方案并尝试了它们,但是没有用。我还确保我的文件在MAMP / tmp /.
编辑:对不起图像的混淆 - > SQL查询。我有/ tmp / test_data /中的文件。我修改了查询以查看那里。答案 0 :(得分:0)
你有cities.sql吗?然后你需要创建新的数据库,给出名称:cities然后将你的cities.sql文件导入城市。
答案 1 :(得分:0)
您表示您在MAMP / temp / ...中有文件,但错误表明它正在/ tmp / test_data /中查找该文件。检查你的tmp vs temp。
答案 2 :(得分:0)
我建议您使用phpMyAdmin UploadDir功能。由于各种权限问题,安全措施和其他特性,即使您提供完整路径,也可以阻止这些进程读取此文件。使用phpMyAdmin UploadDir,你基本上创建了一个文件夹(我的phpMyAdmin安装的子目录),将指令添加到config.inc.php
,并在那里复制文件。 phpMyAdmin在“导入”页面的下拉列表中显示它。同样,您需要对文件和文件夹拥有适当的权限,但我发现它比LOAD DATA INFILE
更容易。
如果您想继续尝试使用MySQL方法,我的猜测是它是一个权限问题。确保Web服务器和MySQL进程对.sql文件具有适当的权限(也可能在它所在的目录上,尽管可能不重要)。您的网络服务器和MySQL错误日志也可能有提示。