查询安装路径: whereis mysql
连接mysql: mysql -u root -p
第一步:创建用户
CREATE USER 'claim_prod'@'%' IDENTIFIED BY 'Password123!';
flush privileges;
select user,host from mysql.user;
删除用户
Delete FROM user Where User='claim_prod' and Host='%';
flush privileges;
第二步:创建实例
create database claim_oauth2_prod;
查询实例 show databases;
删除实例 drop database claim_oauth2_prod;
2.用户权限分配
grant all privileges on `claim_oauth2_prod`.* to 'claim_prod'@'%' ;
flush privileges;
mysql重启
systemctl restart mysqld
查看最大连接数 最大连接数设置在my.cnf max_connections=1000
mysql>show variables like 'max_connections';(查可以看当前的最大连接数)