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!
how to copy a schema
> 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.
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.