1. Export the. SQL file, open the doscommand line, run cd to enter the bin directory of mysql, and run
Mysqldump-uroot-p your Password Database Name> D:/export file name. SQL
For example:
Mysqldump-uroot-p123456 listener> D:/listener. SQL
Ii. log on to mysql in linux
Upload listener. SQL to the system root directory or another directory.
Run
Mysql-uroot-p123456-Dtest <d: \ test \ ss. SQL
I directly access mysql, select the database, use listener, and then execute
Source/listener. SQL
Then complete (listener. SQL is placed in the linux root directory, so use /)
Query OK, 0 rows affected (0.00 sec) Query OK, 2 rows affected (0.01 sec) Records: 2 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) query OK, 1 row affected (0.00 sec) Query OK, 24 rows affected (0.01 sec) Records: 24 Duplicates: 0 Warnings: 0
Similarly, migrating mysql Data from linux to windows is the same.