Project requirements:
(1) share the/data directory separately using Samba and NFS;
(2) To have the Samba client and the NFS client mount the/data/-to-local/mydata directory that is shared on the Samba server, and the data directory of the local mysqld or MARIADB service is set to/mydata, requiring the service to start normally and to store the data normally;
centos 6作为服务器端的操作创建/data目录 `mkdir /data` `chmod 775 /data` `chgrp mysql /data` `chown mysql /data`修改主配置文件 `vim /etc/samba/smb.conf`
Create the specified user and add the Samba user to the database
pdbedit -a -u mysql
Turn on Samba services
service smb start
CentOS 7 operations as a client
Create/mydata
mkdir /mydata
Mount the server-side/data to the client's/mydata
mount -t cifs -o username=mysql,password=123456 //172.16.73.3/myshare /mydata
Modifying the database storage directory
vim /etc/my.cnf
Heavy Duty MARIADB Service
systemctl restart mariadb.service
Create a database
When finished, go to Centos6/data to view
ls /data
Samba, NFS build MySQL