The method of sharing the MySQL database between Ubuntu and windows dual systems

  • 2020-05-12 06:21:29
  • OfStack

Dual system configuration and MySQL database storage scenario: MySQL database is stored in d:\mysql\data under Windows XP, and Ubuntu Server 9.10 under Linux Linux.
Once the dual system is installed, boot to Ubuntu Server 9.10 using GURB and log in as the administrator.
1) and the read-write mode (RW) recognizes the mode of mounting the D partition in Windows to /media/wind.
2) change/media/wind mysql/data permissions
sudo chow mysql: mysql/media/wind/mysql/data (including two mysql said user name and user group)
3) change/etc/mysql/my cnf file, change the datadir
sudo nano etc/mysql/my cnf
Where datadir = /var/lib/mysql
Change to
datadir = / media wind/mysql/data
inventory
4) change/etc/apparmor d/usr_sbin_mysqld content, among them the/var/lib/mysql corresponds to replace the actual storage location
Above/below media/wind/mysql data /
5) restart apparmor and mysql services
sudo/etc/init d/apparmor restart sudo/etc/init d/mysql restart
When I restarted, I encountered an access denial error. I re-performed the change configuration file operation in step 3), and successfully changed user in the file from mysql to root, because the MySQL database under my Windows did not grant access to mysql users.
Conclusion:
I hope that the method of sharing MySQL database in Ubuntu and windows dual systems introduced in this paper will be helpful to readers. More knowledge about linux system is yet to be explored and learned by readers.

Related articles: