반응형
# mysql -uroot -p
MariaDB [(none)]> use inventory;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [inventory]> SELECT * FROM category;
+----+------------+
| id | name |
+----+------------+
| 1 | Networking |
| 2 | Servers |
| 3 | Ssd |
+----+------------+
3 rows in set (0.00 sec)
1. backup
# mysqldump -uroot -p inventory > /tmp/inventory.dump
2. restore
# mysql -uroot -p
MariaDB [(none)]> drop database inventory;
Query OK, 3 rows affected (0.04 sec)
MariaDB [(none)]> create database inventory;
Query OK, 1 row affected (0.00 sec)
# mysql -uroot -p inventory < /tmp/inventory.dump
MariaDB [(none)]> use inventory;Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [inventory]> SELECT * from category;
+----+------------+
| id | name |
+----+------------+
| 1 | Networking |
| 2 | Servers |
| 3 | Ssd |
+----+------------+
3 rows in set (0.00 sec)
반응형
'Linux > CentOS' 카테고리의 다른 글
[CentOS7] Apache HTTP (0) | 2015.03.18 |
---|---|
[CentOS7] MariaDB - 4 (0) | 2015.03.18 |
[CentOS7] MariaDB - 2 (0) | 2015.03.18 |
[CentOS7] MariaDB - 1 (0) | 2015.03.18 |
[CentOS7] SAMBA - 3 (0) | 2015.03.18 |
최근댓글