have you tried using a frontend, such as phpMyAdmin. Its alot easier than remembering the synatx
On the other hand, if you *want* to /*have* to use the termonal, sorry.. i can't help you
Hello all... I am trying to copy the structure of a table (not the data, just the structure and column names) and make about 20 copies of it under different table names. I know that I should be able to do this with mysqldump, but unfortunately, I am a syntax idiot. I read the man pages for it, and I can't (and never have on my Linux systems) the syntax needed.
I know how to use the "-x" options (i.e. -c, or -d, etc.) but I have never successfully used the "--x" options (with the two hyphens). I simply have no idea how to insert them into the command to get it to work, whether it be in mysql, or my terminal.
It is a simple case of my ignorance of a basic principle keeping me from being more productive.
I know that as far as the terminal, this is basic knowledge, but I lack it and any help would be greatly appreciated, as it would save me hours of data input. Thanks guys.
Asus A8V Deluxe Mobo
AMD Athlon64 X2 4400 -939
2GB Crucial DDR3200 Dual-Channel
ATi AiW 9800 Pro 128DDR
Audigy2 ZS
Sony DRU-810 DVD+RW DL
3 x Maxtor MaxLine SATA 160Gb 16Mb Cache
1 x Maxtor MaxLine SATA 300Gb 16Mb Cache
1 x Maxtor MaxLine SATA 120Gb 16Mb Cache
have you tried using a frontend, such as phpMyAdmin. Its alot easier than remembering the synatx
On the other hand, if you *want* to /*have* to use the termonal, sorry.. i can't help you
whatdoyougetwhenyoumultiplysixbynine??
I downloaded SQLyog last night and that seems to work pretty good for me to copy the tables, but I was also asking this because when I am doing something in the terminal (not SQL related), it would be handy to know how to do the options. For example, (this command is completely made up) you can have ls "-c" and that is easy enough to understand, as you just input "ls -c". But let's say you read a man page, and maybe you have other options you can use like "--help" or "--joeblow". When the 'two-hyphen' options come into play, for some reason, I can never get the syntax right and it gets really ugly. I don't know if they are supposed to go in a certain order or...?
Asus A8V Deluxe Mobo
AMD Athlon64 X2 4400 -939
2GB Crucial DDR3200 Dual-Channel
ATi AiW 9800 Pro 128DDR
Audigy2 ZS
Sony DRU-810 DVD+RW DL
3 x Maxtor MaxLine SATA 160Gb 16Mb Cache
1 x Maxtor MaxLine SATA 300Gb 16Mb Cache
1 x Maxtor MaxLine SATA 120Gb 16Mb Cache
Using the following snippit from an online man page:
when you see something like this in a man page, what it says is this:Code:NAME ifconfig - configure network interface parameters SYNOPSIS ifconfig [-L] [-m] interface [create] [address_family] [address[/prefixlength] [dest_address]] [parameters] ifconfig interface destroy ifconfig -a [-L] [-d] [-m] [-u] [address_family] ifconfig -l [-d] [-u] [address_family] ifconfig [-L] [-d] [-m] [-u]
the command (in this case ifconfig) is followed by one or more flags, then an interface, then optionally, directives such as "create" "address_family" etc...
This man page doesn't show "--" flags, but generally the order for any flag doesn't matter as long as you put the flag where they list the optional flags in the page. Now... for "--" flags:
some programs include "long flag names" which generally begin with "--" and often have a "-" equivalent. For instance, some have this:
-h, --help
in their description of what the flags are. This means that -h is equivalent to --help... and will generate the same output. Sometimes you'll see something like "-f, --file=<somefile>"
This usually means you can do something like this:
-f filename
or
--file=filename
that's about all there is to the flags... it seems confusing at first, but that's the gist. If I confused you more, please let me know and I'll try to give a better example.
Nope, actually you clarified it well. What I was always trying to do (dealt with "--" flags with no "-" equivalent) was something like this:
command -c --whatever filename blahblah (I put all of the flags right after the command)
instead of:
command -c filename --whatever blahblah
I should have known that the terminal would interpret the space between filename and blahblah weirdly, and that should have been my first clue that the order was wrong.
Thanks for the help. You just made my future command line stints alot easier.
Asus A8V Deluxe Mobo
AMD Athlon64 X2 4400 -939
2GB Crucial DDR3200 Dual-Channel
ATi AiW 9800 Pro 128DDR
Audigy2 ZS
Sony DRU-810 DVD+RW DL
3 x Maxtor MaxLine SATA 160Gb 16Mb Cache
1 x Maxtor MaxLine SATA 300Gb 16Mb Cache
1 x Maxtor MaxLine SATA 120Gb 16Mb Cache
Bookmarks