首页 🖥运维&安全

MariaDB [keystone]> select u.enabled from user u,local_user lu where u.id=lu.user_id and lu.name='neutron';
+---------+
| enabled |
+---------+
|       1 |
+---------+
1 row in set (0.00 sec)

MariaDB [keystone]> select * from user u,local_user lu where u.id=lu.user_id and lu.name='neutron';
+----------------------------------+-------+---------+--------------------+----+----------------------------------+----------------------------------+---------+
| id                               | extra | enabled | default_project_id | id | user_id                          | domain_id                        | name    |
+----------------------------------+-------+---------+--------------------+----+----------------------------------+----------------------------------+---------+
| 2c8b1e282f804fc58bc8cdfe7518d80f | {}    |       1 | NULL               |  5 | 2c8b1e282f804fc58bc8cdfe7518d80f | 3ac89594c8e944a9b5bb567fca4e75aa | neutron |
+----------------------------------+-------+---------+--------------------+----+----------------------------------+----------------------------------+---------+
1 row in set (0.00 sec)

MariaDB [keystone]> update user u,local_user lu set u.enabled=1 where lu.name='neutron' and u.id=lu.user_id;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1  Changed: 0  Warnings: 0

MariaDB [keystone]> select * from user u;
+----------------------------------+-------+---------+--------------------+
| id                               | extra | enabled | default_project_id |
+----------------------------------+-------+---------+--------------------+
| 020cce9b69a44aef984fa8aba5135f3f | {}    |       1 | NULL               |
| 2c8b1e282f804fc58bc8cdfe7518d80f | {}    |       1 | NULL               |
| 372c371d6c4a4d5aa099376499fa21ef | {}    |       1 | NULL               |
| 413c222a0c0d476fa77e3a096f9da216 | {}    |       1 | NULL               |
| 46faed53c3534611a83f586d55951246 | {}    |       1 | NULL               |
| 53a1cf0ad2924532aa4b7b0750dec282 | {}    |       1 | NULL               |
| 73191a8367e4410da4bf764263ade04c | {}    |       1 | NULL               |
| 95f197fef75a490cbe926350d2688512 | {}    |       1 | NULL               |
| 97dcfcb9a3b84dd5a47d40c01425e8f5 | {}    |       1 | NULL               |
| a0024f4b405745b999aaa1276844dec6 | {}    |       1 | NULL               |
| ce58d9a178ee457589c9bf169d48c9be | {}    |       1 | NULL               |
| d46602d109214aea92ec4f9f0e4223e2 | {}    |       1 | NULL               |
+----------------------------------+-------+---------+--------------------+
12 rows in set (0.00 sec)

MariaDB [keystone]> update user u,local_user lu set u.enabled=0 where lu.name='neutron' and u.id=lu.user_id;
Query OK, 1 row affected (0.02 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [keystone]> select * from user u;
+----------------------------------+-------+---------+--------------------+
| id                               | extra | enabled | default_project_id |
+----------------------------------+-------+---------+--------------------+
| 020cce9b69a44aef984fa8aba5135f3f | {}    |       1 | NULL               |
| 2c8b1e282f804fc58bc8cdfe7518d80f | {}    |       0 | NULL               |
| 372c371d6c4a4d5aa099376499fa21ef | {}    |       1 | NULL               |
| 413c222a0c0d476fa77e3a096f9da216 | {}    |       1 | NULL               |
| 46faed53c3534611a83f586d55951246 | {}    |       1 | NULL               |
| 53a1cf0ad2924532aa4b7b0750dec282 | {}    |       1 | NULL               |
| 73191a8367e4410da4bf764263ade04c | {}    |       1 | NULL               |
| 95f197fef75a490cbe926350d2688512 | {}    |       1 | NULL               |
| 97dcfcb9a3b84dd5a47d40c01425e8f5 | {}    |       1 | NULL               |
| a0024f4b405745b999aaa1276844dec6 | {}    |       1 | NULL               |
| ce58d9a178ee457589c9bf169d48c9be | {}    |       1 | NULL               |
| d46602d109214aea92ec4f9f0e4223e2 | {}    |       1 | NULL               |
+----------------------------------+-------+---------+--------------------+
12 rows in set (0.00 sec)


文章评论