Tag Info

New answers tagged

0

You have to use sed to transform the table name mysqldump -u user -p db_name test_table | sed 's/test_table/test_table_backup/g' > backup.sql Give it a Try !!!


0

+1 for @Wrikken's post. All you are doing by trying to achieve this functionality in your billing software is increasing the chances of bugs, increasing your development time, decreasing you/your company's potential revenue. Let the database do what it does best - you concentrate on getting the billing side of your app to work properly. MySQL's replication ...


0

The only thing I can suggest is to explicitly choose a host by doing one of the following: mysqldump -hlocalhost -uroot -ppassword ideal_inv > ideal_inv.sql mysqldump -h127.0.0.1 -uroot -ppassword ideal_inv > ideal_inv.sql


0

I try to split through "http://www.ozerov.de/bigdump/usage/". I think this may help.


1

You don't say how you are trying to process the file (command line, via a web based tool, ...) but I suspect that you are using something like phpMyAdmin's web based interface which is the most common way people interact with mySQL (aside from through their own code) in my experience. Here you will run into issues with both PHP and the web server it is ...


0

You could try splitting the dump file into tables and loading those tables individually. I have written a tool to do this available on Github here. A Google of "MySQL dump splitter" will give you other tools. The limits of the tool are documented on the page. If you experience difficulties, please let me know and I will try and cater for that - but I can ...


0

I know this is an old thread, but I will post for the benefit of others. I do not have an answer to this question myself, but I am currently in the process of planning for a scenario such as this and while doing so ran into this article that I think might be helpful: ...


0

If you want to dump ONLY one procedure from a database, this line should do the trick. It is not the mysqldump utility, but the mysql interactive application itself. mysql --user=root mydb -e "SHOW CREATE PROCEDURE myprocedure;" > myprocedure.sql Here you can read my full answer for Windows and batch: http://stackoverflow.com/a/25629708/488117


0

After a bit more research, I ran "OPTIMIZE table_name", and now the restore that would have taken two months is taking half an hour. According to the docs, the following is a good time to do run OPTIMIZE: After deleting a large part of a MyISAM or ARCHIVE table, or making many changes to a MyISAM or ARCHIVE table with variable-length rows (tables ...


2

What you need is a tool for controlling migrations and upload them to git a.k.a. a version control for MySQL. While you can deploy your own, this is a very well known problem and there are many tools available, some of them free and open source. I am not going to recommend you anything in particular, as they are different on the goals/features/integration ...


0

If this is a dumpfile, there's no need to write an SQL parser. What is below is simple, possibly naive, but it does demonstrate that you don't have to write tons of code to do what you require (or at least come close). The main problem with what's below is that it requires that any VARCHARs not contain commas or single quotes, but with some tweaking, I ...


0

A common case for this error is when the same table appears more than one in the mysqldump list of tables: mysqldump [options] TableFoo ... TableFoo ...



Top 50 recent answers are included