简体   繁体   English

将文件sql导入cpanel服务器上的phpmyadmin时发生超时错误

[英]Timeout error occurs while import file sql into phpmyadmin on cpanel server

how to import sql into phpmyadmin on cpanel server.i tried to import, but it uploading long time then displays timeout error. 如何在cpanel server.i上将sql导入phpmyadmin中,但我尝试导入,但是上传时间长,然后显示超时错误。

i uploaded my magento site into cpanel but while uploading mysql timeout occurs. 我将我的magento网站上传到cpanel,但是在上传mysql超时时发生。

please help me how to handle this??? 请帮我如何处理???

Try using Sequel Pro , import should be successful. 尝试使用Sequel Pro,导入应该成功。 If still it fails clear the log and core_url_rewrite tables, so the database becomes lighter and reimport. 如果仍然失败,请清除log和core_url_rewrite表,以便数据库变轻并重新导入。 Make sure run catalog url rewrite reindex after the import is successful to regenerate urls. 导入成功后,请确保运行目录url重写reindex,以重新生成url。

PHPMyAdmin does not rely on the timeout or memory limit set in cPanel and takes its values from the server default timeout specified in WHM. PHPMyAdmin不依赖cPanel中设置的超时或内存限制,而是从WHM中指定的服务器默认超时中获取其值。 So if you need it increased, it can be increased via WHM >> Tweak Settings >> cPanel PHP max execution time (its default is 90 sec and you need root access to modify it.) 因此,如果需要增加它,可以通过WHM >> Tweak Settings >> cPanel PHP max execution time来增加它(默认值为90秒,并且需要root用户访问权才能对其进行修改。)

As the database size seems large as it is of a Magento website, I suggest you to try doing the 1st method (source using shell) 由于数据库大小看起来像Magento网站一样大,因此我建议您尝试执行第一种方法(使用shell编写的源代码)

  1. Do you have shell access. 您是否具有外壳程序访问权限。 If yes, log in to the user account as the cPanel user.Issue the following command 如果是,请以cPanel用户身份登录用户帐户。发出以下命令

    mysql -u username -p mysql -u用户名-p

Enter the password when prompted and then enter the command use database_name; 在提示时输入密码,然后输入命令use database_name;。

replace database_name with the actual database name. 用实际的数据库名称替换database_name。

Now import the database by issuing the command 现在通过发出命令导入数据库

source /your/path/to/backup.sql;

where /your/path/to/backup.sql is the actual path to backup file. /your/path/to/backup.sql是备份文件的实际路径。

  1. If this is not available, contact your hosting provider with the backup file and they should be able to source it for you. 如果这不可用,请与您的托管服务提供商联系并提供备份文件,他们应该能够为您找到该文件。

  2. If you need the import to be done via cPanel provided PHPMyAdmin itself, then you need to increase the timeout specified in the beginning. 如果需要通过cPanel提供的PHPMyAdmin本身进行导入,则需要增加开头指定的超时。

  3. Import the backup as chunks but it is more complex. 将备份作为大块导入,但是更复杂。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM