MySQL's Standard Dump/Backup Utility

learn more… | top users | synonyms

0
votes
1answer
432 views

NDB Cluster seems to ignore foreign_key_checks=OFF

According to MySQL documentation on the local foreign_key_checks variable Beginning with MySQL Cluster NDB 7.3.2, setting this variable has the same effect on NDB tables as it does for InnoDB ...
0
votes
1answer
172 views

Migrating/Upgrading a MySQL 5.1 schema to MySQL 5.7 schema

I'm bit green on MySQL upgrades, but my question has to do with single schemas (dbs). I have some hosted databases on a server using MySQL 5.1 Community, and I currently use mysqldump to back those ...
0
votes
0answers
27 views

mysqldbcompare SELECT command denied to user

I am trying to run mysqldbcompare to see the difference between two tables: mysqldbcompare --server1=server1:2016@localhost --server2=server2:2016@localhost user:user --difftype=sql --run-all-tests ...
0
votes
1answer
130 views

mysql database migration of schemas with updated data and structures

I am a newbie with MySQL database dumps and am currently trying to work with data migration between a source schema and a target schema. Assuming the source schema is defined by ...
1
vote
3answers
268 views

Using mysqldump on RDS to export a large file in TSV format

I would like to export a single, large table (30GB) from an RDS MySQL server on a regular basis into a TSV file, so that we can load the file into Vertica. However, RDS doesn't provide a way to use ...
1
vote
2answers
146 views

ALTER DATABASE script preventing restore of MySQL database in another server

While backing up the database with mysqldump --routines options, I see ALTER DATABASE in the middle of the output dump, near the routines. /*!50003 DROP FUNCTION IF EXISTS `f_my_function` */; ALTER ...
12
votes
7answers
83k views

How to import a .sql file in MySQL?

I am trying to import a .sql file using MySQL Workbench and I get this error: ERROR 1046 (3D000) at line 28: No database selected I have first created an empty database called with the same name as ...
3
votes
1answer
653 views

mysqldump: Got error: 1044: Access denied for user 'username'@'localhost' to database 'databasename' when using LOCK TABLES

mysqldump: Got error: 1044: Access denied for user 'username'@'localhost' to database 'databasename' when using LOCK TABLES I am able to loging properly and able to take full backup from SQLyog Tool ...
1
vote
1answer
25 views

How can I do an incremental `mysqldump` without dropping table?

I'd like to fetch the last 100 rows of a table via a mysqldump, but I already have the rest of the table. How can I only fetch the last 100 rows for a mysqldump and then replace (or overwrite) any ...
84
votes
13answers
152k views

How can I move a database from one server to another?

How can I move MySQL tables from one physical server to another? Such as this exact scenario: I have a MySQL server that uses innodb table and is about 20GB size. I want to move it to a new server, ...
1
vote
2answers
4k views

mysqldump Error 2013

I have a database installed, that I would like to backup in mysql. The problem is mysqldump fails on exporting the 'maia_mail' table # mysqldump -u root -p maia > maia.sql mysqldump: Error ...
1
vote
1answer
148 views

MySQL Workbench can either Dump or Restore - How Do I Configure To Do Both?

I have previously posted this question on Stack Overflow, but have not solved the problem. Hopefully it is not incorrect to post it here in the hope that it will be seen by a some different ...
1
vote
0answers
14 views

MySQL quick database transfer between two servers

I am migrating a reasonably large (18GB) database used for a website from one server to another. There are two tables which make up 95% of that size and they do not have to be fully transferred for ...
2
votes
1answer
56 views

ERROR 1031 (HY000) at line X: Table storage engine for 'TBL' doesn't have this option

I am trying to import mysqldump into following system: # cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) # rpm -qa | grep ^mysql mysql-community-libs-compat-5.7.11-1.el7.x86_64 ...
0
votes
1answer
198 views

Shell script for partial table backup

I have multiple database in my MYSQL server and i want to take some particular tables backup from each database. can anyone help me in writting a shell script for this scenario.
1
vote
1answer
144 views

Slave Waiting to reconnect

I have added new slave host to master for replication, but missing some of the parameters. mysql> show slave status\G *************************** 1. row *************************** ...
0
votes
1answer
103 views

MySQL database dump bombs out Error 1064 when using LOCK TABLES

This specific machine is running MySQL version 5.0.27. I have tried to get a full dump of this database several times and each time it bombs out. Tried getting just a structure dump of it and this is ...
0
votes
0answers
18 views

Restoring a mysql database from raw files found in a mysql folder

My webhost screwed me. The dedicated server I had had a failed hdd and I lost the drive. I backed up all files but not the databases. I was able to save some MYI and MYD files but no able to do a ...
3
votes
1answer
45 views

mysqldump inconsistencies

I'm planning to take a dump of a table with the --single-transaction option enabled. I know that if we execute any DDL statements during the dump process we might get an inconsistent dump. Will the ...
1
vote
1answer
4k views

Extremely slow mySql restores

Please bear with me as I ask this question, which looks similar to questions already on DBA@SE. In the current configuration, we have a server (a Linux quadcore box with 4 GB RAM) - Both the Database ...
0
votes
1answer
542 views

Operation failed with exitcode 1 - while importing from a dump folder

I'm new to dbs and I'm trying to learn how a certain db works. They gave me a dump folder to play with it but, after setting up a connection (works), while trying to import, I get this annoying ...
0
votes
1answer
108 views

Consistent backup of large DB --single-transaction

I need to mysqldump a large DB (330 GB) in order to set up a slave for replication. Does --single-transaction allow me to dump the entire DB without shutting mysql down and keeping it down for the ...
1
vote
1answer
34 views

mysqldump not exporting all tables

I have a Drupal site with a fair amount of content, about 12G in size, with 500+ distinct fields making for almost 1400 tables. We're migrating to a new server environment so I need to be able to ...
0
votes
1answer
33 views

mysql diff and add diff records into new database

I have two database on two different hosts: host A has database A and table A and host B has database B and table B and now "host A/database A/table A" table A contains records with primary key ...
0
votes
0answers
47 views

Database as it is raw content

recently I asked my hosting company to give the backup of my database . I asked them to create a new database and import backup to that database. But they reply cannot dump database ...
1
vote
1answer
546 views

Setting MySQLDump to keep running in the background after session times out

I'm tryng to set up a new Slave DB by copying another Slave DB. Normally I would simply use MySQLDump to dump the Slave and create a .sql file, then import that into the new database. However, as our ...
0
votes
1answer
264 views

mysqldump is not dumping data by default

mysqldump is dumping only the table structures, without data, by default. mysqldump -u user -d database -p Which is the option to dump is with data? How can I configure it, to include the data? (I ...
1
vote
1answer
41 views

Incorrect backup size

We are storing our everyday full backup in remote storage. Everything seems to be working fine, but every seven day interval the archived folder size is much more than the everyday archived backup ...
0
votes
1answer
28 views

How speed up mysql dump without data?

There are a lot of questions (1,2,3) about speed up MySql restoring. But all of them speed up data import. Is there a way to speed up schema tables creation? For example dump iundepended table in ...
173
votes
4answers
340k views

How do you mysqldump specific table(s)?

How can I dump a specific table or set of tables without including the rest of the db tables?
0
votes
1answer
196 views

Are certain environment variables required for mysql login-path?

I created a bash script that backs up my database, db_backup.sh It basically just runs these commands: DB=/home/linuxuser/backups/backupfilename.sql.gz mysqldump --login-path=local db_name | gzip ...
0
votes
0answers
15 views

Import MYSQL DB scripts to MSSQL

Please suggest how to restore Mysql DB to SQL server 2008. I have backup script file taken from MYSQL (.sql file) 50gb in size and needs to be restored to SQL server. I have tried using sqlcmd ...
0
votes
1answer
14 views

Copying mysql data from one db to another with a where clause for a subset of tables

I'd like to be able to move mysql data from one db to another. I only want to move records where account_id=1234 except for tables like account which does not have an account_id column. Is there any ...
0
votes
0answers
11 views

MySQL disk usage due to failure on dump import

I've just SCPed a 400 MB database from a live server. I dumped it with mysqldump and gziped it as following: mysqldump --single-transaction=TRUE -u dbuser -p dbname | gzip> /home/user/database.gz ...
1
vote
0answers
23 views

MySQL master to slave dump fails when done over SSH pipe

When we need to [re]build a MySQL-5.5 slave, our usual approach is this (CHANGE MASTER TO / START SLAVE omitted for clarity): master$ mysqldump -uroot -p --all-databases --master-data > dump.sql ...
0
votes
1answer
42 views

MySQL Database import into 5.7 hangs with CLI or with Workbench 6.3 CE

I have a SQL dump file that I exported using Workbench from a server that is being decommissioned. The host and target OS is Microsoft Windows Server 2008 R2 (therefore is x64 natively). There seems ...
0
votes
1answer
119 views

MySQL dump with low disk space

I have an asterisk PBX that has call recordings stored in a SQL database table. This table has 9199 rows and is consuming 21GB on my server. I want to dump the data in this table to restore space on ...
1
vote
2answers
36 views

mysqldump not consistent after stopping slave

We have a Mysql master (server A) and slave (server B) setup. I am trying to create one more slave(server C) for master server(A). I have stopped the slave in server B and noted master server(A) ...
26
votes
4answers
55k views

Safest way to perform mysqldump on a live system with active reads and writes?

I'm not sure if this is true but I remember reading if you run the following command in linux mysqldump -u username -p database_name > backup_db.sql while reads and writes are being made to a ...
4
votes
2answers
90 views

Is there a way to create a MySQL/Percona Slave without using a dump?

I haven't been able to find anything so I'm sure the answer is no, what are you, a noob? but I feel the need to ask anyway :) Is there a simple utility that would allow a new slave server to be ...
0
votes
0answers
29 views

How to dump few columns of a mysql table using mysqldump?

I want to dump few columns of a table. How can I achieve this? Options with me are, (as per my thinking): I can use mysql -hXX -pXX -uXX -pXX db_name -e "select query with particular fields" > ...
5
votes
1answer
361 views

Dump with special characters in table column name

I'm taking over an old database, and while doing recovery tests from my dump I found out a table is wrongly backed up, the table definition is truncated. Looking at the live db I've found a column ...
1
vote
2answers
37 views

Securing MySQL backup process

I'm running my MySQL backups through cron scheduled every night, but the thing is in cron the username and password is given for it run, is there any other way I can securely run the backups? where I ...
0
votes
2answers
266 views

Migrating MySQL database structure with foreign keys fails

I am trying to set up a new testing server with a somewhat complex database structure by dumping the old database and importing it. But even though I use SET FOREIGN_KEY_CHECKS=0;, the import fails ...
0
votes
1answer
147 views

How do you dump specific table(s)?

Hi i have a shell script for doing a selected databases backup. Now my requirement is i wanted to take a particular tables in a database to be backed up. Each database backup need to be created in ...
4
votes
4answers
5k views

how to dump a single stored procedure from a database

I need to create a dump file that contains a single stored procedure from a database. Not all routines from that database
2
votes
1answer
259 views

Mysqldump without slow query

Situation: I currently monitor an instance of MySQL for slow queries. We have a mysql user dedicated to backups which performs a mysqldump, but the mysqldump gets logged as a slow query. Question: ...
1
vote
1answer
74 views

Between optimizing a 1-billion rows table and dump-restoring it, which would be faster?

Have multiple tables which had more than 1 billion rows. Archived and deleted many of them, now want to recover the disk space. Have option to either optimize the table, or dump the table and restore ...
8
votes
2answers
13k views

Taking MySQL dump from another machine

I have a MySQL db on Machine A and I want to access the mysqldump from machine B. Both machines are running on Linux and I also have the credentials of both, but I can't access the mysqldump. What ...
87
votes
7answers
53k views

How can I monitor the progress of an import of a large .sql file?

I am importing a 7 GB foobar.sql to restore a table in a local database. $ mysql -h localhost -u root 'my_data' < foobar.sql $ mysql --version /usr/local/mysql/bin/mysql Ver 14.12 Distrib ...