473,756 Members | 2,117 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need script to copy a database and all it's tables

Hi,

My database contains 45 tables the structure of which is evolving as I
develop. I need a utility that will "read" the structure of this
database and it's tables and then create an identical database with
all tables.

Can you help please ?

Jul 10 '07 #1
12 4554
On 10 Jul, 10:12, Robbo <i...@fds7.comw rote:
Hi,

My database contains 45 tables the structure of which is evolving as I
develop. I need a utility that will "read" the structure of this
database and it's tables and then create an identical database with
all tables.

Can you help please ?
Use the export option of phpmyadmin.

Also see the newsgroup
alt.possessive. its.has.no.apos trophe
for information on the correct use of an apostrophe in the word "its"!

Jul 10 '07 #2
On 10 Jul, 10:32, Captain Paralytic <paul_laut...@y ahoo.comwrote:
On 10 Jul, 10:12, Robbo <i...@fds7.comw rote:
Hi,
My database contains 45 tables the structure of which is evolving as I
develop. I need a utility that will "read" the structure of this
database and it's tables and then create an identical database with
all tables.
Can you help please ?

Use the export option of phpmyadmin.

Also see the newsgroup
alt.possessive. its.has.no.apos trophe
for information on the correct use of an apostrophe in the word "its"!
That is assuming of course that you are using mysql, since you haven't
said what database you are indeed using!

Jul 10 '07 #3
On 10.07.2007 11:12 Robbo wrote:
Hi,

My database contains 45 tables the structure of which is evolving as I
develop. I need a utility that will "read" the structure of this
database and it's tables and then create an identical database with
all tables.

Can you help please ?
If your database is Mysql, there are command-line tools mysqldump (for
export) and mysql (for import). You can also simply copy the db directory.
--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok
Jul 10 '07 #4
On 10 Jul, 11:26, gosha bine <stereof...@gma il.comwrote:
On 10.07.2007 11:12 Robbo wrote:
Hi,
My database contains 45 tables the structure of which is evolving as I
develop. I need a utility that will "read" the structure of this
database and it's tables and then create an identical database with
all tables.
Can you help please ?

If your database is Mysql, there are command-line tools mysqldump (for
export) and mysql (for import). You can also simply copy the db directory.

--
gosha bine

extended php parser ~http://code.google.com/p/pihipi
blok ~http://www.tagarga.com/blok
| You can also simply copy the db directory.

Bad advice! May not work between MySQL versions.

Jul 10 '07 #5
Captain Paralytic wrote:
Also see the newsgroup
alt.possessive. its.has.no.apos trophe
for information on the correct use of an apostrophe in the word "its"!
Read it and its very interesting.

houghi
--
You can have my keyboard ...
if you can pry it from my dead, cold, stiff fingers
Jul 10 '07 #6
On 10.07.2007 12:45 Captain Paralytic wrote:
On 10 Jul, 11:26, gosha bine <stereof...@gma il.comwrote:
>On 10.07.2007 11:12 Robbo wrote:
>>Hi,
My database contains 45 tables the structure of which is evolving as I
develop. I need a utility that will "read" the structure of this
database and it's tables and then create an identical database with
all tables.
Can you help please ?
If your database is Mysql, there are command-line tools mysqldump (for
export) and mysql (for import). You can also simply copy the db directory.

--
gosha bine

extended php parser ~http://code.google.com/p/pihipi
blok ~http://www.tagarga.com/blok

| You can also simply copy the db directory.

Bad advice! May not work between MySQL versions.
Let OP decide if that works for him/her.
--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok
Jul 10 '07 #7
On 10 Jul, 12:06, gosha bine <stereof...@gma il.comwrote:
On 10.07.2007 12:45 Captain Paralytic wrote:


On 10 Jul, 11:26, gosha bine <stereof...@gma il.comwrote:
On 10.07.2007 11:12 Robbo wrote:
>Hi,
My database contains 45 tables the structure of which is evolving as I
develop. I need a utility that will "read" the structure of this
database and it's tables and then create an identical database with
all tables.
Can you help please ?
If your database is Mysql, there are command-line tools mysqldump (for
export) and mysql (for import). You can also simply copy the db directory.
--
gosha bine
extended php parser ~http://code.google.com/p/pihipi
blok ~http://www.tagarga.com/blok
| You can also simply copy the db directory.
Bad advice! May not work between MySQL versions.

Let OP decide if that works for him/her.

--
gosha bine

extended php parser ~http://code.google.com/p/pihipi
blok ~http://www.tagarga.com/blok- Hide quoted text -

- Show quoted text -
| Let OP decide if that works for him/her.

He/She can decide now that they are warned!

Jul 10 '07 #8
Captain Paralytic wrote:
On 10 Jul, 11:26, gosha bine <stereof...@gma il.comwrote:
>On 10.07.2007 11:12 Robbo wrote:
>>Hi,
My database contains 45 tables the structure of which is evolving as I
develop. I need a utility that will "read" the structure of this
database and it's tables and then create an identical database with
all tables.
Can you help please ?
If your database is Mysql, there are command-line tools mysqldump (for
export) and mysql (for import). You can also simply copy the db directory.

--
gosha bine

extended php parser ~http://code.google.com/p/pihipi
blok ~http://www.tagarga.com/blok

| You can also simply copy the db directory.

Bad advice! May not work between MySQL versions.
It also can cause inconsistent results of MySQL is running at the time,
and generally will not work for INNODB tables.

I agree - a very bad suggestion! Rather, Export/Import or Backup/Restore.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Jul 10 '07 #9
On 10.07.2007 13:41 Jerry Stuckle wrote:
>>
| You can also simply copy the db directory.

Bad advice! May not work between MySQL versions.

It also can cause inconsistent results of MySQL is running at the time,
and generally will not work for INNODB tables.
Yes, like most technical suggestions/advices it may or may not work
under some specific conditions. I just pointed out that such a
possibility exists.

--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok
Jul 10 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2251
by: Brian Murphy | last post by:
<?php /* I need your help. I'd be very thankfull if write me this script.I need a script that displays a list of categories and subcategories like this: <select name="category"> <option value="1">Main</option> <option value="2">Main > Computers</option> <option value="4">Main > Computers > Hardware </option>
5
3059
by: lkrubner | last post by:
I have a webserver through Rackspace. I create a domain. I create an FTP user. I upload some files. I create a database called testOfSetupScript and then I create a database user named setup. I write some PHP code which should, I think, be able to to auto create the tables. The SQL looks like this:
48
3873
by: phillip.s.powell | last post by:
MySQL 3.23.58 - 4.0.17 (yep, several database server instances, don't ask) I have database Spring with table Students I have database Summer with table Students I am tasked to produce a query of all students in both tables with no duplicates. No clue whatsoever.
3
1593
by: Martin | last post by:
I'm having trouble getting a new PHP/MySQl installation to work. Windows XP Pro, IIS 5.1, PHP 5.1.1, MySQL 5.0.16, ISAPI This is a new computer. The whole setup is for development use only - no access from beyond my own network. PHP seems to be working OK. I can open a test.php page ok - It executes down to the statement where I try to connect to the MySQL database. At that point, nothing further happens. The page is served
0
1424
by: EiEiO | last post by:
Hello all. I am hoping I could get some suggestions on moving forward. My Challenge: Importing data from one table to another where the field names almost never match. My Form has a list box, (this is the FROM table), that lists tables in the currentDb. Also, multiple comboboxes to and to .
1
1134
by: VB Programmer | last post by:
Someone gave me an SQL script to run against my SQL Express database. It creates some tables, etc... What is the best way to run this script in the Visual Studio interface? Thanks.
20
4282
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site is structured as an upside-down tree, and (if I remember correctly) never more than 4 levels. The site basically grew (like the creeping black blob) ... all the pages were created in Notepad over the last
5
34049
by: Steve | last post by:
Hi; I thought I would rephrase a question I asked in another post to more quickly get to the heart of the matter. My apologies for anyone who is offended by what appears to be a repetition. My company has two identical web sites. One copy is for our customer, and one copy is for us to test our code changes on. We developed a hard to isolate bug in the copy of the web stie for our
16
4854
by: Okonita via DBMonster.com | last post by:
Hi all, I am comming along with all this Linus/DB2/scripting business...I am no longer scared of it!! (LOL). But, I need to create a .ksh script that does a REORGCHK and output only tables recommended for reorg. My goal is to reorgchk and run reorgs based on entries in this reorg file as shown in the example below. I have tried my hand at the following failing script and hope that gurus here can throw me a lifeline of examples on how to...
0
9462
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9287
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10046
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9857
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8723
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6542
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3817
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3369
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.