quickly copy MySQL InnoDB database without using MySQL dump

For this process We should noted that there must have the same architecture on both machines. I.e. if we have 32 bit on one server then other server would also have 32 bit. But in case if we have 32 bit on one server and 64-bit on another then we will have to use MySQL dump.

mysqldump – MySQL Database Backup and restore program

Backup and Restore Mysql database table

Doing import-export through MySQL dump was taking long time, so I found this easy way to copy/move database for the server same architecture.

Steps are as follows:-

  1. First of all, stop MySQL on both servers (service mysqld stop)
  2. You need to copy several files in your MySQL DB folder. Default path is /var/lib/mysql/
  3. Locate the folder with the name of your database and copy that. I have used highly recommend rsync for copying files between two servers. This would include all the files and folders of mysql directory including ibdata1, ib_logfile0, ib_logfile1, mysql_upgrade_info etc.
  4. Start MySQL (service mysqld start)

Now all done.

Related Posts

  • 48
    What is database? Database is an organized collection of information about an entity having controlled redundancy and serves multiple applications. DBMS (database management system) is an application software that is developed to create and manipulate the data in database. A query language can easily access a data in a database.…
    Tags: database, server, mysql
  • 41
    MySql export schema without data Login to DB server Run the below command to take backup of schema of database without data. # mysqldump -u root –p  -d olddb > backup.sql OR # mysqldump -u root -p --no-data dbname > schema.sql    
    Tags: database, mysql, server, copy
  • 41
    What is mysqldump The mysqldump client is a utility that performs logical backups, producing a set of SQL statements that can be run to reproduce the original schema objects, table data, or both. It dumps one or more MySQL database for backup or transfer to another SQL server. The mysqldump command can also generate output…
    Tags: dump, server, mysql, database
  • 39
    If you omit the ENGINE option, the default storage engine is used. Normally, this is MyISAM, but you can change it by using the --default-storage-engine server startup option, or by setting the default-storage-engine option in the my.cnf configuration file. You may also want to change the default storage engine just for the current session. You can do this…
    Tags: database, innodb, server
  • 37
    Here we will help you to setup master-slave replication between MySQL servers. Setup Details: Master Server: 10.0.10.12 Slave  Server: 10.0.10.18 Database: empmaster 1. Setup MySQL Master Server Create an mysql account on Master server with REPLICATION SLAVE privileges to which replication client will connect to master. Block write statement on…
    Tags: mysql, server, database

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: