💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
### 创建数据库: mysql> create database max_finance_dev; mysql> create database max_finance_test; 授权用户: mysql> CREATE USER 'finance'@'%' IDENTIFIED BY 'e@finance'; mysql> grant all on max_finance_dev.* TO 'finance'@'%'; mysql> grant all on max_finance_test.* TO 'finance'@'%'; ### 查看用户权限: mysql> show grants for 'finance'@'%'; +----------------------------------------------------------------------+ | Grants for finance@% | +----------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'finance'@'%' | | GRANT ALL PRIVILEGES ON `max_finance_test`.* TO 'finance'@'%' | | GRANT ALL PRIVILEGES ON `finance_dev`.* TO 'finance'@'%' | +----------------------------------------------------------------------+ 4 rows in set (0.00 sec) ### 权限回收 mysql> revoke all PRIVILEGES ON `finance`.* from 'finance'@'%' mysql> show grants for 'finance'@'%'; +----------------------------------------------------------------------+ | Grants for finance@% | +----------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'finance'@'%' | | GRANT ALL PRIVILEGES ON `max_finance_test`.* TO 'finance'@'%' | | GRANT ALL PRIVILEGES ON `max_finance_dev`.* TO 'finance'@'%' | +----------------------------------------------------------------------+ 3 rows in set (0.00 sec)