migrate
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
Connect to MySQL
|
||||
----------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `mysql -u root -p` | Connect to MySQL as root user |
|
||||
| `mysql -u <user> -p` | Connect to MySQL as a specific user |
|
||||
| `mysql -u root -p -h <host>` | Connect to MySQL on a specific host |
|
||||
|
||||
Backup and Restore
|
||||
------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `mysqldump -u root -p <database> > backup.sql` | Backup a database to a file |
|
||||
| `mysql -u root -p <database> < backup.sql` | Restore a database from a file |
|
||||
Reference in New Issue
Block a user