mysql-useful-commands
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| mysql-useful-commands [2023/11/04 17:50] – [Restore MySQL system database in docker environment] baumi | mysql-useful-commands [2024/09/06 18:20] (current) – baumi | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| ~~ | ~~ | ||
| ====== MySQL useful commands ====== | ====== MySQL useful commands ====== | ||
| - | ===== Create Database User and Grant all rights to a DB ===== | + | ===== User & Permissions ===== |
| + | ==== Create Database User ==== | ||
| <code sql> | <code sql> | ||
| CREATE USER ' | CREATE USER ' | ||
| + | </ | ||
| + | ==== Delete Database User ==== | ||
| + | <code sql> | ||
| + | DROP USER ' | ||
| + | </ | ||
| + | ==== Grant Permissions ==== | ||
| + | <code sql> | ||
| GRANT ALL privileges ON dbname.* TO ' | GRANT ALL privileges ON dbname.* TO ' | ||
| FLUSH privileges; | FLUSH privileges; | ||
| </ | </ | ||
| - | ===== Set new DB user password | + | ==== Set new DB user password ==== |
| <code sql> | <code sql> | ||
| SET PASSWORD FOR ' | SET PASSWORD FOR ' | ||
| </ | </ | ||
| + | === Delete Database User === | ||
| + | |||
| + | |||
| ===== Update field and replace string ===== | ===== Update field and replace string ===== | ||
| <code sql> | <code sql> | ||
mysql-useful-commands.1699116600.txt.gz · Last modified: by baumi
