碼迷,mamicode.com
首頁 > 數據庫 > 詳細

mysql數據庫(11):恢復數據

時間:2021-07-26 16:51:34      閱讀:0      評論:0      收藏:0      [點我收藏+]

標簽:恢復   ase   sha   data   http   圖片   rgba   inf   復數   

(1)先登錄

mysql -h localhost -u root -p

技術圖片

 

 (2)查看數據庫有哪些

show databases;

技術圖片

 

 (3)新建一個空表text

create database text ;                           ####新建數據庫text ,等下導表用###

技術圖片

 

 (4)刪除數據庫chuan

drop database chuan;

技術圖片

 

 查看還在不在?不在了

show databases;

技術圖片

 

 退出mysql后再執行以下命令恢復數據庫中的表:

mysql -h localhost -u root -p mysql <D:\test\chuan.sql

 技術圖片

 

 使用如下命令能夠查看到表已經備份進去了

show tables;

技術圖片

 

 如何恢復數據庫呢?以下將chuan.sql備份到text空數據庫中

mysql -h localhost -u root -p text <D:\test\chuan.sql

技術圖片

 

 再次登錄查看,是成功將chuan這個數據庫備份到了text數據庫了。

mysql -h localhost -u root -p  ##登錄##

use text

show tables;

技術圖片

 

mysql數據庫(11):恢復數據

標簽:恢復   ase   sha   data   http   圖片   rgba   inf   復數   

原文地址:https://www.cnblogs.com/aisisi/p/15059021.html

(0)
(0)
   
舉報
評論 一句話評論(0
登錄后才能評論!
? 2014 mamicode.com 版權所有  聯系我們:gaon5@hotmail.com
迷上了代碼!
4399在线看MV_久久99精品久久久久久久久久_成人又黄又爽又刺激视频_能收黄台的app不收费