Tag Info

New answers tagged

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 ...


0

If you want the binlog file and position, just include --master-data. According to the MySQL Documentation on mysqldump's --master-data option Use this option to dump a master replication server to produce a dump file that can be used to set up another server as a slave of the master. It causes the dump output to include a CHANGE MASTER TO ...


0

To dump a database mysqldump -u root -p databasename > databasename.sql Dumping particular table alone then this would apply mysqldump -u... -p... mydb t1 t2 t3 > mydb_tables.sql



Top 50 recent answers are included