91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

MYSQLDUMP TABLE IN SQL FORMAT

發布時間:2020-08-10 20:26:27 來源:ITPUB博客 閱讀:156 作者:lovehewenyu 欄目:MySQL數據庫
MYSQLDUMP TABLE IN SQL FORMAT


1.What is mysqldump ?
mysqldump is a sql based dump, data is dumped then loaded and all indexes are recreated. During mysqldump, all the tables would be locked and will not be accessible for queries.


2.Create test table doudou01 and doudou02
mysql> select * from doudou01;
+----+
| i  |
+----+
|  2 |
| 22 |
| 35 |
+----+
3 rows in set (0.00 sec)


3.list of mysqldump sql
[root@dbdou02 ~]# mysqldump -pDoudou123! test doudou01
Warning: Using a password on the command line interface can be insecure.
-- MySQL dump 10.13  Distrib 5.6.29, for Linux (x86_64)
--
-- Host: localhost    Database: test
-- ------------------------------------------------------
-- Server version       5.6.29


## Basic information ##


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;


--
-- Table structure for table `doudou01`
--


DROP TABLE IF EXISTS `doudou01`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `doudou01` (
  `i` bigint(20) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`i`)
) ENGINE=MyISAM AUTO_INCREMENT=36 DEFAULT CHARSET=gbk;
/*!40101 SET character_set_client = @saved_cs_client */;
## create table statement ##
--
-- Dumping data for table `doudou01`
--


LOCK TABLES `doudou01` WRITE;
/*!40000 ALTER TABLE `doudou01` DISABLE KEYS */;
INSERT INTO `doudou01` VALUES (2),(22),(35);
/*!40000 ALTER TABLE `doudou01` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
## export table data to sql-format ##


/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;


-- Dump completed on 2016-03-18 15:02:09






4.backup using mysqldump
[root@dbdou02 ~]# mysqldump -uroot -p test doudou01 >doudou01.sql
[root@dbdou02 ~]# mysqldump -uroot -p test doudou02 >doudou02.sql
[root@dbdou02 ~]# ls -l doudou*
-rw-r--r--. 1 root root 1866 Mar 21 11:14 doudou01.sql
-rw-r--r--. 1 root root 2102 Mar 21 11:14 doudou02.sql


5.reloading SQL-Format Backups
5.1 use mysqldump other database
mysql> use test1
Database changed
mysql> show tables;
Empty set (0.00 sec)
5.2 source dump.sql
mysql> source doudou01.sql
Query OK, 0 rows affected (0.00 sec)
...


Query OK, 3 rows affected (0.00 sec)
Records: 3  Duplicates: 0  Warnings: 0
...


mysql> source doudou02.sql
Query OK, 0 rows affected (0.00 sec)
...


Query OK, 3 rows affected (0.01 sec)
Records: 3  Duplicates: 0  Warnings: 0
...


5.3 check list reload tables
mysql> show tables;
+-----------------+
| Tables_in_test1 |
+-----------------+
| doudou01        |
| doudou02        |
+-----------------+
2 rows in set (0.00 sec)


mysql> select * from doudou01;
+----+
| i  |
+----+
|  2 |
| 22 |
| 35 |
+----+
3 rows in set (0.00 sec)


mysql> select * from doudou02;
+------------+---------+---------------------+
| country_id | country | last_update         |
+------------+---------+---------------------+
|          1 | doudou  | 2016-03-18 14:47:59 |
|          2 | dba     | 2016-03-18 14:47:59 |
|          3 | nba     | 2016-03-18 14:47:59 |
+------------+---------+---------------------+
3 rows in set (0.01 sec)


6.It's Successly !


########################################################################################
版權所有,文章允許轉載,但必須以鏈接方式注明源地址,否則追究法律責任!【QQ交流群:53993419】
QQ:14040928 E-mail:dbadoudou@163.com
本文鏈接: http://blog.itpub.net/26442936/viewspace-2060811/
********* 6年DBA工作經驗,尋求新工作機會 *********
########################################################################################






向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

平顺县| 平利县| 肥城市| 武穴市| 合肥市| 兰西县| 青铜峡市| 中宁县| 靖安县| 黑山县| 新龙县| 鱼台县| 安图县| 河源市| 白水县| 屏南县| 勐海县| 西乌珠穆沁旗| 桑植县| 乌鲁木齐市| 荣成市| 尼勒克县| 寿宁县| 宁都县| 洪江市| 固始县| 都兰县| 禄劝| 墨脱县| 金昌市| 柳林县| 额济纳旗| 随州市| 绥化市| 乌兰县| 铜川市| 定南县| 高台县| 布拖县| 大兴区| 同仁县|