版本说明

本机:

jdk 8

使用IntelliJ IDEA调试MyCAT 1.6 release

 

主机一:droplet  CentOS 7.5 x86_64

MyCAT 1.6 release

OpenJDK 1.8

MySQL-Server 5.7

 

主机二:bandwagon CentOS 6.8 i686

MySQL-Client 5.6

 

实验过程

 

0. 调整时区
timedatectl set-local-rtc 1
timedatectl set-timezone Asia/Shanghai

1. MySQL 5.7 安装

为加快速度,使用二进制安装

规划了三个实例

[karenyin@centos-s-karenyin mysql_data]$ tree -L 1
.
├── 10010
├── 10011
├── 10012
├── conf
└── start_mysql.sh

从零开始mycat实验环境搭建 

wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.13-1.el7.x86_64.rpm-bundle.tar
rpm -ivh mysql-community-common-8.0.13-1.el7.x86_64.rpm
rpm -e --nodeps mariadb-libs-5.5.56-2.el7.x86_64
rpm -ivh mysql-community-libs-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-8.0.13-1.el7.x86_64.rpm
yum install -y libaio
rpm -ivh mysql-community-server-8.0.13-1.el7.x86_64.rpm

mysqld --defaults-file='/home/karenyin/mysql_data/conf/10010.cnf' --initialize-insecure
mysql -u -S 你在后面再接个参数, 跳过加载权限表 可以进去改个密码,再退出来。
--skip-grant-tables

mysql --defaults-file='/home/karenyin/mysql_data/conf/10010.cnf'
create database TESTDB;
CREATE USER 'karenyin'@'%' IDENTIFIED BY "123456";
grant all privileges on db_music.* to 'karenyin'@'%' identified by "123456";
CREATE USER 'karenyin'@'localhost' IDENTIFIED BY "123456";
grant all privileges on db_music.* to 'karenyin'@'localhost' identified by "123456";
flush privileges;
CREATE USER "root"@"%" IDENTIFIED BY "123456";
grant all privileges on *.* to 'root'@'%' identified by "123456" with grant option;
flush privileges;
show grants; 查看select user()的授权情况
show grants for karenyin;
show grants for karenyin@'%';
View Code

相关文章:

  • 2021-09-27
  • 2021-11-07
  • 2021-12-29
  • 2021-09-30
  • 2021-08-27
  • 2021-12-22
猜你喜欢
  • 2021-04-05
  • 2021-07-04
  • 2022-12-23
  • 2021-10-29
  • 2021-09-28
  • 2021-05-27
  • 2021-06-12
相关资源
相似解决方案