Samba, NFS build MySQL

Source: Internet
Author: User
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

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.