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.
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:-
- First of all, stop MySQL on both servers (service mysqld stop)
- You need to copy several files in your MySQL DB folder. Default path is /var/lib/mysql/
- 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.
- Start MySQL (service mysqld start)
Now all done.
- 48What 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.…
- 41What 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…
- 39If 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…
- 38Birth Of MySQL MySQL started out with the intention of using the mSQL database system to connect to tables using fast low-level (ISAM) routines. However, after some testing, They conclude that mSQL was not fast enough or flexible enough. This resulted in a new SQL interface to our database but with…