DevinC

Member
Jul 11, 2006
9
0
151
Hello,

I am having some trouble understanding what I need to do.

Using cPanel's backup feature, I have already downloaded a backup copy of one MySQL database (in compressed GZ format) to my local machine. I've tried using either Winzip or WinRAR to extract the content but all I am seeing is a file within that has unknown file extension.

I need to uncompress the database into a folder with all table still intact. Ie. a bunch of file ending with MYD, MYI, and FRM extensions.

What tools and steps are necessary to achieve this objective?

I am using Windows 2000.

Thanks,

Devin
 

elleryjh

Well-Known Member
Apr 12, 2003
475
0
166
The file that you downloaded and gunzipped should be a mysql dump, that is a text file containing the information to restore the database.

Try opening it in notepad or a text editor to view it.

To restore it, FTP it to your server, then SSH to your server and use the command:
Code:
mysql -u user_name -D db_name -p < the_sql_file
Or upload it with phpMyAdmin's SQL tab.

cPanel does not provide you access directly to the raw MYI, etc database files which is probably for the best.
 

DevinC

Member
Jul 11, 2006
9
0
151
Hi elleryjh,

Thank you for the instruction. Is it possible to do a dump directly from MySQL server already installed on my local machine?

My shared webhost provider do not permit shell access or has the phpMyAdmin tool available.

Thanks,

Devin
 

DevinC

Member
Jul 11, 2006
9
0
151
Hello, I had a look at the script and its doing the exact opposite of what I am trying to accomplish.

I've found some following information in MySQL Reference Manual:

You can also store the dump in a file, transfer the file to the target machine, and then load the file into the database there. For example, you can dump a database to a compressed file on the source machine like this:

shell> mysqldump --quick db_name | gzip > db_name.gz

Transfer the file containing the database contents to the target machine and run these commands there:

shell> mysqladmin create db_name
shell> gunzip < db_name.gz | mysql db_name


I am repeatly receiving SQL syntax error message. I don't know what the problem is with my syntax as I have already tried everything I can think of, including full path.

I am thinking that this issue is more about MySQL rather than cPanel's so I will post my question on MySQL forum.

Thanks,

Devin