Port mysql databases to linux in windows

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.