List:General Discussion« Previous MessageNext Message »
From:Stefan Hinz Date:August 3 2001 2:32pm
Subject:Re: generate database script from existing table?
View as plain text  
Dear Tong,

if you have access to the machine in question as root, try:

    mysqldump --all-databases > export_it_all_file.sql

You may have to enter MySQL superuser name and password, so it goes like
this:

    mysqldump --all-databases -u superuser -p > export_it_all_file.sql
(enter pw at prompt)

The file mysqldump produces holds all the SQL statements needed for a
batch job, creating all databases with all tables and all data. To
import this on the other machine, try:

    mysql -u superuser -p < export_it_all_file.sql

You may want to use PhpMyAdmin (www.phpmyadmin.com) for this. It has a
graphical, browser based interface which does the same as mysqldump.

Regards,

--
  Stefan Hinz
  Geschäftsführer / CEO iConnect e-commerce solutions GmbH
  #  www.js-webShop.com www.iConnect.de
  #  Gustav-Meyer-Allee 25, 13355 Berlin
  #  Tel: +49-30-46307-382  Fax: +49-30-46307-388

----- Original Message -----
From: "Tong Kiat, Chiah" <tongkiat.chiah@stripped>
To: <mysql@stripped>
Sent: Friday, August 03, 2001 12:44 PM
Subject: generate database script from existing table?


Hi

I just took over a mysql database with no documenation.  Is there any
tools or anyway I could generate a database/table creation script from
the current database?  This is because I need to recreate the database
on another machine and currently I have no way of doing so.

thanks
tk


Thread
generate database script from existing table?Chiah Tong Kiat3 Aug
  • Re: generate database script from existing table?Ilya Martynov3 Aug
  • Re: generate database script from existing table?Werner Stuerenburg3 Aug
  • Re: generate database script from existing table?Gerald Jensen3 Aug
  • Re: generate database script from existing table?j.urban3 Aug
  • Re: generate database script from existing table?Stefan Hinz3 Aug
RE: generate database script from existing table?Adam Douglas3 Aug