473,395 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Export whole MySql database

Hi folks,

I am looking for the straightest way to export a whole MySql database, but
all I can find is SQL statements to export specific tables.
Any suggestions?

--
Freundliche Grüße,
Franz Marksteiner

Feb 23 '08 #1
15 3270
Franz Marksteiner wrote:
Hi folks,

I am looking for the straightest way to export a whole MySql database,
but all I can find is SQL statements to export specific tables.
Any suggestions?
Try a mysql newsgroup - such as comp.databases.mysql. Your question has
nothing to do with PHP.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Feb 23 '08 #2
On Feb 23, 1:28 pm, "Franz Marksteiner" <franzmarkstei...@gmail.com>
wrote:
Hi folks,

I am looking for the straightest way to export a whole MySql database, but
all I can find is SQL statements to export specific tables.
Any suggestions?

--
Freundliche Grüße,
Franz Marksteiner
I think PHPMyAdmin will do it. That is, if you have access to that
handy little program.
Feb 23 '08 #3
Jerry Stuckle wrote:
Franz Marksteiner wrote:
>Hi folks,

I am looking for the straightest way to export a whole MySql
database, but all I can find is SQL statements to export specific
tables. Any suggestions?

Try a mysql newsgroup - such as comp.databases.mysql. Your question
has nothing to do with PHP.
Just because the string "PHP" does not show up in my post, does not mean
that the post has nothing to do with it...

So if you ain`t got a clue simply don`t answer...

--
Freundliche Grüße,
Franz Marksteiner

Feb 23 '08 #4
Franz Marksteiner wrote:
Jerry Stuckle wrote:
>Franz Marksteiner wrote:
>>Hi folks,

I am looking for the straightest way to export a whole MySql
database, but all I can find is SQL statements to export specific
tables. Any suggestions?

Try a mysql newsgroup - such as comp.databases.mysql. Your question
has nothing to do with PHP.

Just because the string "PHP" does not show up in my post, does not mean
that the post has nothing to do with it...

So if you ain`t got a clue simply don`t answer...
Oh, I've got a clue. But you sure don't.

This isn't a MySQL newsgroup.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Feb 23 '08 #5
Franz Marksteiner wrote:
Jerry Stuckle wrote:
>Franz Marksteiner wrote:
>>Hi folks,

I am looking for the straightest way to export a whole MySql
database, but all I can find is SQL statements to export specific
tables. Any suggestions?

Try a mysql newsgroup - such as comp.databases.mysql. Your question
has nothing to do with PHP.

Just because the string "PHP" does not show up in my post, does not mean
that the post has nothing to do with it...

So if you ain`t got a clue simply don`t answer...
And BTW - if you have a PHP question, what is that PHP question? All
you've asked about is MySQL - and this is not a MySQL newsgroup.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Feb 23 '08 #6
Franz Marksteiner schreef:
Jerry Stuckle wrote:
>Franz Marksteiner wrote:
>>Hi folks,

I am looking for the straightest way to export a whole MySql
database, but all I can find is SQL statements to export specific
tables. Any suggestions?

Try a mysql newsgroup - such as comp.databases.mysql. Your question
has nothing to do with PHP.

Just because the string "PHP" does not show up in my post, does not mean
that the post has nothing to do with it...

So if you ain`t got a clue simply don`t answer...
system("mysqldump <...parameters...>");
for correct '<...parameters...>' please ask in some MySQL newsgroup ;-)

--
Luuk
Feb 23 '08 #7
..oO(Franz Marksteiner)
>Just because the string "PHP" does not show up in my post, does not mean
that the post has nothing to do with it...
What does dumping a DB to a file have to do with PHP?

Micha
Feb 23 '08 #8
Franz Marksteiner wrote:
Hi folks,

I am looking for the straightest way to export a whole MySql database,
but all I can find is SQL statements to export specific tables.
Any suggestions?
If its on linux, simply go into /var/lib/mysql/databasename and tar the
lot up..if you want a duplicate setup.

I believe that UNLOAD or DUMP will give you a format that you can use to
extract data from..
Feb 24 '08 #9
The Natural Philosopher wrote:
Franz Marksteiner wrote:
>Hi folks,

I am looking for the straightest way to export a whole MySql database,
but all I can find is SQL statements to export specific tables.
Any suggestions?
If its on linux, simply go into /var/lib/mysql/databasename and tar the
lot up..if you want a duplicate setup.
This is not at all safe!

I believe that UNLOAD or DUMP will give you a format that you can use to
extract data from..

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Feb 24 '08 #10
Jerry Stuckle wrote:
The Natural Philosopher wrote:
>Franz Marksteiner wrote:
>>Hi folks,

I am looking for the straightest way to export a whole MySql
database, but all I can find is SQL statements to export specific
tables.
Any suggestions?
If its on linux, simply go into /var/lib/mysql/databasename and tar
the lot up..if you want a duplicate setup.

This is not at all safe!
It is if you stop the mysqld daemon first.

At that point the daemon cleans all up, and flushes all its caches.

You will have a consistent database.
>
>I believe that UNLOAD or DUMP will give you a format that you can use
to extract data from..

Feb 24 '08 #11
..oO(The Natural Philosopher)
>Jerry Stuckle wrote:
>The Natural Philosopher wrote:
>>If its on linux, simply go into /var/lib/mysql/databasename and tar
the lot up..if you want a duplicate setup.

This is not at all safe!

It is if you stop the mysqld daemon first.
No. It's like copying raw inodes instead of using the appropriate higher
level tools for copying files.
>At that point the daemon cleans all up, and flushes all its caches.

You will have a consistent database.
But maybe with broken or no data at all. Not everyone uses MyISAM
tables. And even with MyISAM there are some things that may screw up
your data in such an operation.

The correct way is mysqldump, that's what this tool is for.

Micha
Feb 24 '08 #12
The Natural Philosopher wrote:
If its on linux, simply go into /var/lib/mysql/databasename and tar
the lot up..if you want a duplicate setup.
This is not at all safe!

It is if you stop the mysqld daemon first.

At that point the daemon cleans all up, and flushes all its caches.

You will have a consistent database.
No, Jerry is right. The method you suggested only works with the MyISAM
storage engine.

With any other storage engine (InnoDB comes to mind, which is the most
commonly used today because it supports transactions) your method leads
to data loss. I learned that the hard way.

Bye!
Feb 24 '08 #13
The Natural Philosopher wrote:
Jerry Stuckle wrote:
>The Natural Philosopher wrote:
>>Franz Marksteiner wrote:
Hi folks,

I am looking for the straightest way to export a whole MySql
database, but all I can find is SQL statements to export specific
tables.
Any suggestions?

If its on linux, simply go into /var/lib/mysql/databasename and tar
the lot up..if you want a duplicate setup.

This is not at all safe!

It is if you stop the mysqld daemon first.
Not necessarily.
At that point the daemon cleans all up, and flushes all its caches.
Not always.
You will have a consistent database.
Nope.
>>
>>I believe that UNLOAD or DUMP will give you a format that you can use
to extract data from..

Which is *EXACTLY* why people should ask questions in an appropriate
newsgroup. You will get good answers in comp.database.mysql. The MySQL
experts hang out there.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Feb 24 '08 #14
Anonymous wrote:
The Natural Philosopher wrote:
>>>If its on linux, simply go into /var/lib/mysql/databasename and tar
the lot up..if you want a duplicate setup.

This is not at all safe!
It is if you stop the mysqld daemon first.

At that point the daemon cleans all up, and flushes all its caches.

You will have a consistent database.

No, Jerry is right. The method you suggested only works with the MyISAM
storage engine.
Ok, I concede that point all right.
>
With any other storage engine (InnoDB comes to mind, which is the most
commonly used today because it supports transactions) your method leads
to data loss. I learned that the hard way.

Bye!
Feb 24 '08 #15
On Sat, 23 Feb 2008 19:28:24 +0100, Franz Marksteiner wrote:
Hi folks,

I am looking for the straightest way to export a whole MySql database, but
all I can find is SQL statements to export specific tables.
Any suggestions?
Look at mysqldump.

http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html

--
I told you this was going to happen.

Feb 25 '08 #16

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

Similar topics

11
by: Mike MacSween | last post by:
My client has an MS Access database application on her local machine. I have full access to that in terms of changing the design. I've got a simple PHP/MySql application on shared hosting, so no...
0
by: Priscilla Walther | last post by:
Hi All - I'm a newbie to the database area, but have inherited a MySQL database to manage along with my development duties. We have a very large MySQL database, and the designer of the...
1
by: Dave Crypto | last post by:
Hi there, SUMMARY: 1) When I use phpadmin to export a large database, the file created on my local PC never containes all the tables and information. It seems to max out at about 10mb. 2)...
5
by: Kajol | last post by:
Hi All, can u plz tell me how to import data from mysql to another database. & how to export data from anotherdata base to mysql Thanx for ur Advice Regards Kajol
4
by: JJ | last post by:
Hi, usually, I'm not using MS servers, but I have a big problem with a Access table. I should create a web application for a Historical Dipartment. They have created a populated a Access...
6
by: Robin Cushman | last post by:
Hi all, I need some help -- I'm working with an A2K database, using DAO, and am trying to read records into a Crystal Report and then export it to a folder on our network as an Excel...
7
by: phillip.s.powell | last post by:
We're looking at a GUI interface for our MySQL DB and I am interested in MySQL Administrator, however, one of our requirements is to be able to import/export databases. Is this possible or do I...
0
by: jen78 | last post by:
Hi, I am new to Oracle administration and hope someone can help me out on this as i am struggling to make it work.... I am doing development work using oracle database on my own development...
7
by: eselk | last post by:
I'm doing some speed tests. I created a brand-new table, with just one "Long Integer" field. I'm testing adding 1000 records. If I use the "Export" feature in Access, it takes only a few seconds...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.