How to dump database using mysql (no mysqldump on server)

I need to dump a database from a shared hosting that is somehow not installed mysqldump

. In fact, I only have mysql

and mysqladmin

available from the entire set of MySQL utilities.

Is this doable or do I have to resort to installing something like phpMyAdmin?

+2


source to share


6 answers


Anyway,



I had to resort to using Sypex dumper , a web-based tool for fast (really fast, much faster than phpMyAdmin for example) dumping a MySQL database. It's in Russian, but the interface is pretty obvious.

0


source


You can use the following methods (from Database Backups in the documentation)

Creating backups by copying files

MyISAM tables are stored as files, so it's easy to back up by copying the files. To get a consistent backup, make LOCKING TABLES on the respective tables, followed by FLUSH TABLES for the tables. You only need a read lock; this allows other clients to keep querying tables while copying files to the database directory. The FLUSH TABLES statement is required to ensure that all active index pages are written to disk before starting the backup.

FLUSH TABLES WITH READ LOCK;

      

Closes all open tables and locks all tables for all read-locked databases until you explicitly release the lock by executing UNLOCK TABLES. This is a very convenient way to get backups if you have a file system like Veritas that can take snapshots.

UNLOCK TABLES;

      



Create delimited backups

To create a text file containing table data, you can use:

SELECT * INTO OUTFILE 'file_name' FROM tbl_name

      

This method works for any data file, but only stores the table data, not the table structure.

To reload the output file use "

LOAD DATA INFILE

      

+2


source


how to shutdown the server and copy the datadir itself?

0


source


You can get SQLYog . It has a standby database as an SQL Dump option for each database.

0


source


You can connect to the server remotely using mysqldump. For example:

mysqldump -u poweruser -h remote.mysql.host database 

      

0


source


Maatkit seems to be quite suitable for this with mk-parallel-dump and mk-parallel-restore .

-1


source







All Articles