Problem In Database Backup
Posted on 2002-07-25
Actually I have complicated problem with database backup, and I can summarize it as following:
I have website with disk quota of 500MB and I have a bulletin board that takes about 450MB (database size).
Now I can't upgrade my site disk quota over 500MB because it is the highest plan on the hosting company.
Ok, the host company solves the problem when they take a backup to me and put it some where.
Now, I gzip the database backup and transfer it to my new site which disk quota is 2.5 GB , I create a new database and user and I use telnet to restore the backup:
mysql new_database_name -unew_user_name -pxxxxx < my_backup.sql
But I got an error:
"ERROR 1044 at line 11: Access denied for user: 'new_user_name@localhost' to database 'old_database_name'"
I use the same mysql command with other small backup and it is work fine !
I open the beginning of my backup file and I notice that in line number 11:
CREATE DATABASE /*!32312 IF NOT EXISTS*/ old_database_name;
And I think this is the problem.
I ask the support man in my old website hosting company about that and he said that:
"Decompress the backup file, then you should be able to delete the lines in it. However, you should just need to delete the first line, not the second."
And my response was:
"It is not logical to download backup file with more than 400MB and delete one line then save it and upload it again !
What is the editor that can open this huge file?
How can I download and then upload this huge file while I am using dialup connection ?
Is there other solution?
Please, I need your help"
I am still waiting the technical support response for more than 2 hours, and I hope to get a solution for my problem from you ASAP.