export PATH=$PATH:/usr/local/mysql
chown -R mysql /data/mariadb
启动mysql
mysqld_safe --defaults-file=/usr/local/mysql/my.cnf &
登陆mysql
mysql -uroot -p --socket=/data/mariadb/data/mysql.sock
参考文档:https://www.cnblogs.com/daixiang/p/5431639.html
#配置GTID
mysqld_safe --gtid_mode=ON --log-bin --log-slave-updates --enforce-gtid-consistency &
./bin/mysqld_safe --defaults-file=/data/opt/mysql/my.cnf --user=mysql --gtid_mode=ON --log-bin --log-slave-updates &
主从配置gtid参考
http://blog.csdn.net/wuxbeyond/article/details/49615359