grant all privileges on *.* to 'user'@'host' identified by 'password' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
权限管理 1.创建账号 # 本地账号 create user 'egon1'@'localhost' identified by '123'; # mysql -uegon1 -p123 # 远程帐号 create user 'egon2'@'192.168.31.10' identified by '123'; # mysql -uegon2 -p123 -h 服务端ip create user 'egon3'@'192.168.31.%' identified by '123'; # mys
Mysql 创建一个用户 hail,密码 hail,指定一个数据库 haildb 给 hail mysql -u root -ppassworduse mysql;insert into user(host,user,password) values('localhost','hail',password('hail'));flush privileges;create database haildb;grant all privileges on haildb.* to hail@localh
mysql 创建一个用户 hail,密码 hail,指定一个数据库 haildb 给 hail mysql -u root -p password use mysql; insert into user(host,user,password) values('localhost','hail',password('hail')); flush privileges; create database haildb; grant all privileges on haildb.* to hail@
创建一个连接池操作类 using MySql.Data.MySqlClient; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Timers; namespace CommonAssistant { public class MySqlConnectionPool { private readonly string sqlConnect = st