Re: Get MySQL table schema for a dump
| From: | Fredrik de Vibe | Date: | Wed, 26 Feb 2003 23:31:05 +0000 |
| Subject: | Re: Get MySQL table schema for a dump | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-25935@lists.php.net to get a copy of this message | ||
jvilla@isdesigndev.com (Jonathan Villa) writes:
> Is there was to get a database's table schema?
I don't think it's called schemas in mysql, but I'm not sure :-)
> So far, I have a simple function which will output
> INSERT INTO table (x,x,x,) VALUES(x,x,x);
> [ ... ]
> but what I'm missing is
> CREATE table blah, blah, blah
mysqldump is the tool you need.
e.g.
$ mysqldump -u user [-p] Database > db_dump_file.sql
man mysqldump for more info.
--
--Fredrik
If God is dead, who will save the Queen?