Importing large databases to virtual hosts with cPanel

time:11-07-07 forum:PHP tools and code
  Reloaded from http://bbs.idcspy.com/thread-1781-1-20.html

no longer FRET for uploading the database - import a large database

with cPanel to virtual hosts, everyone knows that phpMyAdmin import database has a size limit, and the time is a little longer, and time out has failed.

there are also various kinds of software to import on the Internet. Usually, the method of cutting SQL files into multiple packages is trivial, and the success rate is not very high.

if your database is large, you will often be upset.


I have been directly logon to the virtual host using SSH directly to run the following commands to import:

mysql -u username -p password [-h database host] database.Lt; database backup.Sql
but many space providers do not give open or permission.


suddenly thought that you could use crontab to run commands. The test was successful.


1. uploads your backup SQL file through FTP and puts it in the root directory.

2. enters your cPanel, see the cron jobs icon, click in, and select Advanced (Unix Style) (ha ha I'm more used to UNIX HA).

because it only needs to run once, so Minute, Hour, Day, Month all fill in the ready time, leave two minutes (if the virtual host is not local, you can look at the host time on FTP), Weekday fill the number.

Command to fill in the command to run, is the Import command:

mysql -u username -p password [-h database host] database.Lt; database backup.Sql


speed is very fast, my 1G database is also a few minutes.

prev:no prev next:North Garden Road collision, drive frien...
post comment
Notice



approved   Ji'nan old shoemaker has made more t...   Ji'nan auxiliary police "storm" Engl...   Australian 16 year old girl, driving...   North drift Female Boxers earn "bloo...   The only teacher in island primary s...
rand   PHP is also 21 years old      Analyze the process and principle of...   The setcookie function of PHP   PHP functions to solve the URL encod...
ads

other

Because all the contents of this site are reproduced from other media, the intention is to provide free services to the public, but it does not mean that this site agrees with its views, and can not be responsible for the authenticity of its verification, such as the copyright unit or individual of the manuscript does not want to publish on this site, please Contact me, I will immediately remove it, thank you. Contact: atseashawk@163.com