发布时间:2020-06-01 15:26:37来源:阅读:
仅新建一个newuser用户
方法一:
MariaDB [(none)]> create user newuser@localhost identified by '123456';
Query OK, 0 rows affected (0.22 sec)
MariaDB [(none)]> select user from mysql.user;
+---------+
| user |
+---------+
| aa |
| root |
| root |
| |
| aa |
| bb |
| lcz |
| my |
| mytest |
| newuser |
| nome |
| root |
| |
| root |
+---------+
14 rows in set (0.00 sec)
MariaDB [(none)]>
方法二:
MariaDB [(none)]> insert into mysql.user(user,host,password) values('ggo','localhost',password('1234'));
Query OK, 1 row affected, 4 warnings (0.24 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.25 sec)
效果
[root@localhost ~]# mysql -uggo -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or g.
Your MariaDB connection id is 4
Server version: 5.5.52-MariaDB MariaDB Server
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
MariaDB [(none)]>
新建一个my用户并且授权全部操作权限
MariaDB [(none)]> grant all privileges on *.* to my@localhost identified by '123456';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> select user from mysql.user;
+--------+
| user |
+--------+
| aa |
| root |
| root |
| |
| aa |
| bb |
| lcz |
| my |
| mytest |
| nome |
| root |
| |
| root |
+--------+
13 rows in set (0.14 sec)
MariaDB [(none)]>
查看用户权限
MariaDB [(none)]> show grants for my@localhost;
+--------------------------------------------------------------------------------------------------------------------+
| Grants for my@localhost |
+--------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'my'@'localhost' IDENTIFIED BY PASSWORD '*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9' |
+--------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
MariaDB [(none)]>
指定部分授权
grant insert,update,delete,select on *.* to mytest@localhost;
Apowersoft手机管理大师(手机管理工具) v3.2.7.1破解版
68.3M
endnote x7(文献管理软件) v17.0.7072 破解版
114MB
mt4(多帐户云跟单管理系统)v4.0 免费版
3.2M
realtek hd(音频管理工具)v2.81 官方版
77.7M
印象笔记(笔记资料管理软件) v6.23.2.8859 中文版
122.6M
叮当管家(客栈公寓管理助手) 1.6.6.1 最新版
32.61 MB
网易邮箱大师(邮件管理软件) v4.13.3.1004 最新版
28.3M
3dmax场景助手下载
0.17MB
HeidiSQL下载
10.1M
bosskey下载
268KB
virtual drive manager下载
0.21MB
客户达开店管家下载
40.2MB
家庭记账软件下载
2.0M
开源数据库软件
219M
旺财流水账下载
4.85MB
百卓优采云进销存下载
28.8M
百度云批量离线下载神器64位
1.5M
2020-04-11
音箱或耳机只有一个声道有声音或两个声道中一个声音大另一个声音小
联想显示器按键定义和OSD菜单界面
那个男人回来了,《和平精英》即将引来更新,你回来吗?
You will need re2c 0.13.4 or later if you want to regenerate PHP parsers
inotify-tools使用方法介绍
单显卡笔记本游戏全屏问题的调试汇总
Docker命令行参考(39) – docker service scale缩放服务
ThinkPad -- Intel(R) PRO/10/100/1000以太网卡驱动程序安装方法(Windows 2000/XP)
采用RAID SSD的机型安装Win10系统无法识别随机标配的硬盘