Important! This is an automatic machine translated page. If you can read english, you should Click Here to read the original English version of the article.

Dump just the table structure to a file in MySQL Dump tikai tabulas struktūras failu MySQL

For this exercise, we will use the mysqldump utility the same as if we were Attiecībā uz šo uzdevumu, mēs izmantosim mysqldump lietderība pats, ja mēs backing up the entire database. pamatni veido visu datubāzi.

Syntax: Sintaksi:

mysqldump -d -h localhost -u root -pmypassword databasename > dumpfile.sql mysqldump-d-h localhost-u root-pmypassword databasename> dumpfile.sql

The only option that is different than creating an entire backup is the -d switch, which tells mysqldump not to output the data. Vienīgais risinājums, kas ir savādāka nekā rada visa rezerves ir-d slēdzi, kas stāsta mysqldump nav izejas datus.

Example: Piemērs:

mysqldump -d -h localhost -u root -p2Uad7as9 database01 > dumpfile.sql mysqldump-d-h localhost-u root-p2Uad7as9 database01> dumpfile.sql

This article was originally written on 09/11/06 Tagged with: Šis pants tika sākotnēji rakstīts uz 09/11/06 tagged with: MySQL MySQL

Daily Email Updates Daily Email Updates

You can get our how-to articles in your inbox each day for free. Jūs varat saņemt mūsu how-to rakstus savā pastkastītē katru dienu par brīvu. Just enter your name and email below: Vienkārši ievadiet jūsu vārdu un e-pasta zemāk:


Name: Vārds:
Email: E-pasts:

Comments (4) Komentāri (4)

  1. Girish Girish

    --
    –Use this to take only the Table structure of the database table in Linux – -Izmantojiet šo veikt tikai tabulas struktūras datu bāzes tabulas Linux --

    On the terminal Par termināls
    [root@localhost ~]# mysqldump -uroot -proot123 -h200.200.200.12 mydatabasename tbl_mytable_name –no-data > /tmp/tbl_mytable_name_dump.sql [root @ localhost ~] # mysqldump-uroot-proot123-h200.200.200.12 mydatabasename tbl_mytable_name-no-data> / tmp / tbl_mytable_name_dump.sql

    Remember , if u dont redirect it to a file, it will stores the dump at pwd by the name “oot” Atcerieties, ja u dont novirzīt to failu, tas būs veikalos izgāztuve pie pwd ar nosaukumu "oot"

    Regards, Sveicieni,
    Girish Girish :-)

  2. Girish Girish

    u can restore it in the database using ,,,, u var atjaunot to datu bāzē, izmantojot,,,,
    mysql > source /path/to/a/dump/file mysql> izcelsmes / path / uz / / dump / fails

  3. shravan shravan

    Thanks. Pateicība. It helps! It helps!

  4. scrumpyjack scrumpyjack

    ok, say you have two dbs very similar in structure. ok, pieņemsim, ka jums ir divas DBS ir ļoti līdzīga struktūra. one you use as a master template which goes through various revisions, let's say we're now on revision 3. viena jums izmantot kā kapteinis veidni, kas iet cauri dažādiem labojumiem, pieņemsim, ka mēs esam tagad 3 revision. but the second db is a copy of the template as it was at revision 1. bet otrais db ir kopija veidni kā tas bija 1 pārskatīšanas.

    because db 2 is in use, you don't want to drop any tables, but you do need to update the structure of the entire db to the latest version of db 1. jo db 2 tiek izmantoti, jūs nevēlaties piliens visām tabulām, bet jums ir nepieciešams atjaunināt struktūru visu db uz jaunāko versiju db 1.

    is there any method of doing this without having to manually go through and make all the same changes again and again (over many dbs at various versions) and without losing any of the data? Vai ir kāda metode, kā to panākt bez rokām iet cauri un darīt visu pašas izmaiņas atkal un atkal (daudzu DBS dažādās versijās) un nezaudējot datus?


Leave a Comment Leave Comment




Leave your Atstājiet savu friendly draudzīgs comment here. komentārus šeit.

If you have a computer help question, Ja Jums ir dators palīdzēt jautājumu, click here to leave it on the forums click here to atstāt uz forumu instead. vietā.

Note: Your comment may not show up immediately on the site. Piezīme: Jūsu komentārs var neparādīties pat tieši uz vietas.

Our Friends Our Friends
Getting Started Getting Started


About How-To Geek Par How-To Geek
What Is That Process? Kas ir šis process?
svchost.exe svchost.exe
jusched.exe jusched.exe
dwm.exe dwm.exe
ctfmon.exe ctfmon.exe
wmpnetwk.exe wmpnetwk.exe
mDNSResponder.exe mDNSResponder.exe
wmpnscfg.exe wmpnscfg.exe
rundll32.exe rundll32.exe
wfcrun32.exe wfcrun32.exe
Ipoint.exe Ipoint.exe
Itype.exe Itype.exe
Wfica32.exe Wfica32.exe
Mobsync.exe Mobsync.exe
conhost.exe conhost.exe
Dpupdchk.exe Dpupdchk.exe Adobe_Updater.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. Copyright © 2006-2009 HowToGeek.com. All Rights Reserved. All Rights Reserved.