How to share a MySQL database in Ubuntu and windows

Source: Internet
Author: User
Sharing ubuntu and windows systems is one of the ways users like to use, while MySQL is a small relational database management system, which is often used in combination with WAMP on Windows platforms, in Linux, LAMP is often used in combination. The following method allows the Ubuntu platform to share the MySQL database on Windows.

Sharing ubuntu and windows systems is one of the ways users like to use, while MySQL is a small relational database management system, which is often used in combination with WAMP on Windows platforms, in Linux, LAMP is often used in combination. The following method allows the Ubuntu platform to share the MySQL database on Windows.

Dual-system configuration and MySQL database storage situation: the mysql database is stored in d: \ MySQL \ data under Windows XP, And the Linux system is Ubuntu Server 9.10.
After the dual-system is installed, use GURB to start to Ubuntu Server 9.10 and log on as an administrator.
1) and read/write mode (RW) to attach D partition in Windows to/media/wind.
2) Change/media/wind/mysql/data Permissions
Sudo chow mysql: mysql/media/wind/mysql/data (two mysql instances represent the user name and user group respectively)
3) change the/etc/mysql/my. cnf file and Its datadir
Sudo nano/etc/mysql/my. cnf
Replace datadir =/var/lib/mysql
Change
Datadir =/media/wind/mysql/data
Disk Storage
4) CHANGE/etc/apparmor. d/usr_sbin_mysqld and replace/var/lib/mysql with the actual storage location.
Above/media/wind/mysql/data/
5) restart the apparmor and mysql services.
Sudo/etc/init. d/apparmor restart sudo/etc/init. d/mysql restart
During the restart process, I encountered a denial of access error. Re-Execute step 3rd to change the configuration file and change the user in the file from mysql to root, the reason is that my MySQL database in Windows does not grant access permissions to mysql users.
Summary:
I hope that the methods for sharing MySQL Databases in Ubuntu and windows systems will be helpful to readers. more knowledge about linux systems remains to be explored and learned by readers.

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.