| gerrit gsql - Administrative interface to active database |
| 'ssh' -p <port> <host> 'gerrit gsql' |
| [--format {PRETTY | JSON}] |
| Provides interactive query support directly against the underlying |
| SQL database used by the host Gerrit server. All SQL statements |
| are supported, including SELECT, UPDATE, INSERT, DELETE and ALTER. |
| Set the format records are output in. In PRETTY (the |
| default) records are displayed in a tabular output suitable |
| for reading by a human on a sufficiently wide terminal. |
| In JSON mode records are output as JSON objects using the |
| column names as the property names, one object per line. |
| Execute the single query statement supplied, and then exit. |
| Caller must be a member of the privileged 'Administrators' group. |
| Intended for interactive use only, unless format is JSON. |
| To manually correct a user's SSH user name: |
| $ ssh -p 29418 review.example.com gerrit gsql |
| Welcome to Gerrit Code Review v2.0.25 |
| Type '\h' for help. Type '\r' to clear the buffer. |
| gerrit> update accounts set ssh_user_name = 'alice' where account_id=1; |
| $ ssh -p 29418 review.example.com gerrit flush-caches --cache sshkeys --cache accounts |
| Part of link:index.html[Gerrit Code Review] |