how to copy a schema

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
alan

how to copy a schema

Post by alan » Sat 08 Jul 2006 13:44

Hello,

I would like to copy a schema and change its name from the original.

Also how do you delete a schema?

And how can one get a list of all the schema's on a mysql database?

Thanks!

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 10 Jul 2006 14:11

> I would like to copy a schema and change its name from the original.
Please pay attention on mysqldump utility. Possibly it'll be useful for you. This utility is included into MySQL Server installation pack.
To achieve this goal you can also use TMyDump or TMyBackup components of MyDAC. Please see MyDAC help for detailed information.

> Also how do you delete a schema?
There are two ways to delete a database on the server:
1. calling MyServerControl.DropDatabase(...) method;
2. executing DROP DATABASE command with MyConnection, MyQuery, etc.

> And how can one get a list of all the schema's on a mysql database?
There are two ways to get list of databases on the server:
1. calling MyConnection.GetDatabaseNames() method;
2. executing SHOW DATABASES command with MyQuery.

Post Reply