I recently graduated from a windows mysql database to a linux database. I need to port mysql under windows to linux. I have had the experience of porting mysql databases under windows, you only need to copy the data file of msql to the data storage location of the machine where mysql is installed, and then restart the mysql service. (For the data file location of the mysql database, see my. ini) but in linux, if you simply copy it like this and then restart it, it does not seem to work and always reports ERROR: can't read dir: "/var/lib/mysql /... "errno: 13. I checked it on the internet for permission reasons. During the copy folder, I used root to log on and run mysql instead of root. Then I changed the directory ownership after copy. sudo chmod 777/ after var/lib/mysql/mydb/* is restarted, you can use ps: 777 of permissions are sufficient, but may not be reasonable.