当前位置:网站首页>MySQL advanced (13) command line export import database
MySQL advanced (13) command line export import database
2022-07-25 01:55:00 【InfoQ】
One 、 Command line export database
- Get into MySQL In the catalog bin Folder :cd MySQL Medium to bin Directory of folders
cd D:\Program Files\MySQL\MySQL Server 5.5\bin- Export database :
mysqldump -u user name -p Database name > Exported file name
mysqldump -u lmapp -p lmapp -P 3308 > lmapp.sql ( After entering, it will let you enter MySQL Password )mysqldump -u user name -p Database name Table name > Exported file name mysqldump -u lmapp -p lmapp users> test_users.sql ( There is no semicolon at the end )

-P 3308Two 、 Command line import database
- To be imported .sql Move to file bin Under the document , Such a path is more convenient
- The same as the first one exported above 1 Step
- Get into MySQL:
mysql -u user name -p
mysql -u root -p- stay MySQL-Front Create the database you want to build in , This is an empty database , If you create a new one named news The target database of
- Input :
mysql>use Target database name
- Import files :
mysql>source The name of the imported file ;


3、 ... and 、Win32 Next MySQL Backup and restore of
3.1 Backup
mysqldump -u user name -p databasename >exportfilenamemysqldump -u root -p voice>voice.sql3.2 Restore
Four 、Linux Next MySQL Backup and restore of
4.1 Backup
[[email protected] ~]# cd /var/lib/mysql ( Enter into MySQL The library catalog , According to their own MySQL Adjust the directory for installation )
[[email protected] mysql]# mysqldump -u root -p voice>voice.sql4.2 Restore
[[email protected] ~]# mysql -u root -p enter , Input password [[email protected] ~]# cd /var/lib/mysql ( Enter into MySQL The library catalog , According to their own MySQL Adjust the directory for installation )
[[email protected] mysql]# mysql -u root -p voice<voice.sql5、 ... and 、 Extended reading Not reliable FLOAT data type
DOUBLEMySQLfloatMySQLDECIMALfloat(5.54) = 5.54 边栏推荐
- Simulation Implementation of [STL] string class
- Antdb database products were selected into the global database industry map (2022) of the China Academy of communications and communications
- Origin and development of philosophy Hegel external historical form
- How to upload files to the server
- The importance of system to Philosophy Hegel
- The cloud ecology conference comes with the "peak"!
- Musk responded whether he would upload his brain to the cloud: already did it!
- Completefuture parallel asynchronous return processing
- Open source demo | release of open source example of arcall applet
- KVM virtualization jobs
猜你喜欢

MySQL Basics (concepts, common instructions)

Using multithreaded execution method in Lua script based on nlua implementation

Thinkphp5.0.24 deserialization chain analysis

Actf questions (dropper+master_of_dns)

Antdb database products were selected into the global database industry map (2022) of the China Academy of communications and communications

Boutique solution | Haitai cloud password application service solution to create secure and compliant Cloud Applications
![[C + + primer notes] Chapter 6 functions](/img/9a/b79e7c3013678038420faee329d6b6.jpg)
[C + + primer notes] Chapter 6 functions

Rightmost × Microframe, high quality heif image coding and compression technology

C#/VB. Net insert watermark in word

KVM virtualization jobs
随机推荐
Data management process model of science and technology planning project
Open source demo | release of open source example of arcall applet
Interpretation of video generation paper of fed shot video to video (neurips 2019)
SetTimeout parameters [easy to understand]
C traps and defects Chapter 2 lexical "traps" 2.4 switch statements
The importance of system to Philosophy Hegel
What are the important trends revealed by the release of "operator data viability index"?
[28. Maximum XOR pair]
Three modes of executing programs, memory and cache
[summer daily question] output of Luogu p1157 combination
Nacos service discovery data model
Introduction to ORM framework - what is ORM framework?
【Power Shell】Invoke-Expression ,Invoke-Expression -Command $activateCommand; Error or power shell failed to activate the virtual environment
Deamnet|filenotfounderror: [winerror 3] the system cannot find the specified path.: '/ Datasettest\\Set12‘
Turn: emotional internal friction is the biggest source of inefficiency in your life
Worthington cytochrome c digestion study carboxypeptidase B scheme
Several application scenarios of NAT
[summer daily question] Luogu P7550 [coci2020-2021 6] bold
JVM Foundation
Ecosystem long-term observation data product system