The method of sharing Mysql database under Ubuntu and Windows dual system _mysql

Source: Internet
Author: User
Tags mysql in
Dual-system configuration and MySQL database storage scenarios: Windows XP d:\mysql\data in the MySQL database, Linux system for Ubuntu Server 9.10.
Dual system installed, using Gurb to boot to Ubuntu Server 9.10, log in as an administrator.
1 and read and write mode (RW) to mount Windows D partition to/media/wind.
2) Change/media/wind/mysql/data permissions
sudo chow Mysql:mysql/media/wind/mysql/data (of which two MySQL respectively represents the username and the user group)
3) Change the/etc/mysql/my.cnf file and change its datadir
sudo nano/etc/mysql/my.cnf
Put the DataDir =/var/lib/mysql
Change to
Datadir=/media/wind/mysql/data
Save
4 Change the/etc/apparmor.d/usr_sbin_mysqld content, replace the/var/lib/mysql in the actual storage location
Like the/media/wind/mysql/data/above
5 Restart AppArmor and MySQL service
Sudo/etc/init.d/apparmor Restart Sudo/etc/init.d/mysql Restart
During my reboot I encountered an Access denied error, rerun the change profile operation in step 3rd, and succeeded after changing user in the file from MySQL to root, because my MySQL database under Windows does not grant access to MySQL users.
Summarize:
I hope that this article describes the Ubuntu and Windows dual system sharing MySQL database method can be helpful to readers, more about the Linux system knowledge has yet to be explored and learned by the reader.
Related Article

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.