导入用phpmyadmin导出的mysql数据库到本地灯栈 [英] import mysql database exported with phpmyadmin into local lamp stack

查看:100
本文介绍了导入用phpmyadmin导出的mysql数据库到本地灯栈的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从phpMyAdmin导出了mydb.sql.大小约为0.9GB.

I exported mydb.sql from phpMyAdmin. It is about 0.9GB in size.

我将mydb.sql复制到一个外部硬盘驱动器上,然后将该驱动器插入另一台我刚刚安装了LAMP堆栈的计算机上.

I copied mydb.sql onto an external hard drive, plugged that drive into another computer on which I just installed a LAMP stack.

在终端上的Ubuntu 14.04的那台新计算机上,我键入

On that new computer, in Ubuntu 14.04, from terminal, I type

mysql -u -p,然后登录mysql.

mysql -u -p, and log into mysql.

然后我输入

mysql> use mydb
mysql> source mydb.sql

景气!它起飞了.但是五分钟之内失败:

Boom! It takes off. But within five minutes, failure:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<br />
<b>Fatal error</b>:  Maximum execution time of 300 seconds exceeded in <b' at line 83

从许多Google搜索看来,这与我的php.ini文件及其max_execution_time和其他限制有关.我已将该文件更改为达到这些限制,但是仍然遇到相同的错误.

It appears from lots of google searches that this has to do with my php.ini file and its max_execution_time and other limits. I have changed that file to up those limits, but I still get the same error.

有什么想法吗?我认为通过mysql命令行引入mydb.sql不会涉及php,但显然可以.

Any ideas? I thought that bringing mydb.sql in via the mysql command line would not involve php, but apparently it does.

推荐答案

ERROR 1064 (42000): You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right syntax to use near 
'<br /><b>Fatal error</b>:  Maximum execution time of 300 seconds exceeded in <b' at line 83

此行不应位于您的mydb.sql中.这个问题已经被标记为phpmyadmin,因此很容易猜出数据是随它导出的,但是脚本到达300秒(这是服务器允许的最大值)时终止.

This line should not be in your mydb.sql. This question has been tagged phpmyadmin so it's easy to guess that the data was exported with it but the script was terminated when it reached 300 seconds which is the max allowed on your server.

您有两个选择:

1)更改您的php.ini,以增加最大执行时间

1) change your php.ini to increase the max execution time

2)使用mysqldump转储数据库

2) dump the database using mysqldump

这篇关于导入用phpmyadmin导出的mysql数据库到本地灯栈的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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