Mysql databse backup windows to linux machine
Step 1: Open command prompt in administrator mode on Windows machine. Navigate to the path to bin in the directory where MySQL was installed.
Example: cd C:\Program Files\MySQL\MySQL Server 5.6\bin
Step 2: Go to that directory in command prompt and execute below command.
mysqldump.exe -u <Username> -p <database_name> > <Backup_directory>\applicare.sql
Example :
mysqldump.exe -u root -p applicare > C:\Applicare_DB_Backup\applicare.sql
Step 3: After executing, mysql will ask for password, Give it and wait for few minutes.
Note: After executed that command make sure there is sql file named applicare.sql in backup directory
Step 4: In putty, login to the machine on which mysql is running.
Note: The sql file applicare.sql should be moved via winscp or ftp to the linux machine running mysql.
Step 5: Create a new database on linux machine with the same database name as backup on windows mysql.
Example:
mysqladmin -uroot -p create applicare
Step 6: In putty navigate to the directory where the applicare.sql file is located on the linux machine and then execute the below command.
mysqladmin -u<Username> -p <database_name> < applicare.sql
Example:
mysqladmin -uroot -p applicare < applicare.sql
Comments
0 comments
Article is closed for comments.