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.