mysqldump

How to create an identical gzip of the same file?

I have a file, its contents are identical. It is passed into gzip and only the compressed form is stored. I'd like to be able to generate the zip again, and only update my copy should they differ. As it stands diffing tools (diff, xdelta, subversion) see the files as having changed. Premise, I'm storing a mysqldump of an important data...

MySQL Import Database Error because of Extended Inserts

Hello all, I'm importing a 400MB(uncompressed) MySQL database. I'm using BIGDUMP, and I am getting this error: Stopped at the line 387. At this place the current query includes more than 300 dump lines. That can happen if your dump file was created by some tool which doesn't place a semicolon followed by a linebreak at the end of ea...

How can I access the MySQL command line with XAMPP for Windows?

How can I access the MySQL command line with XAMPP for Windows? ...

Edit very large sql dump/text file (on linux)

I have to import a large mysql dump (up to 10G). However the sql dump already predefined with a database structure with index definition. I want to speed up the db insert by removing the index and table definition. That means I have to remove/edit the first few lines of a 10G text file. What is the most efficient way to do this on li...

mysql dump tables only

Hi there In my database I have some tables and views. How can I export all the tables( and not the views ) from my database from command line? ...

MySQL synchronisation between 2 db

I am currently looking for a quick way to sync my production db and my dev-db. I was thinking of doing it with something like this : mysqladmin -u <user> -p<password> <dev-db_name> | mysqldump -u <user> -p<password> --databases <production-db-name> --add-drop-table but it seems that it just prints all of the drump on the screen inste...

Needs a .sql File

I am wondering what a .sql file looks like. How do I create one from mysqldump? ...

Is it possible using PHP to backup SQL without dependecies? If not, which is the best?

After a huge MySQL blunder on a production server (my fault, and yes I have learned), I am now looking at creating a dump of the MySQL database before I do a critical operation (about 15 queries to the db, insert/update/selects). I know phpMyAdmin can 'dump' the database to SQL queries, but I think this may be a feature of it, not a feat...

Php Db synchronization

Hello, I have a local server where I do all my testing and work. Once I am done, I simply upload the db schema along with the relevant code. However the problem arises when I make some changes to the schema. I have to manually type the "alter table" query on my live server. Is there a way to get the incremental changes that took place...

mysqldump passthru returncode's

Hello, I am trying to do a mysql dump via php. This is the code $backupFile = $table. "-". date("Y-m-d-H:i:s") . '.gz'; //Command nog aanpassen.... $command = "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname | gzip > $backupFile"; //$status = system($command); echo $backupFile ."<br>"; $status = passthru...

MySQL backup and restore from command line.

Hi, I am using Command line to backup and restore MYSQL Database. Let use I m having a Database Data1 having Views and Procedures in it. When in Cmd line, I use mysql dump i.e ..>bin> mysqldump -u root -proot Data1> Datafile.mysql When I use above Cmd, It creates a Backup file on bin Folder of Mysql with Dtafile.mysql Name. but the ...

Import SQL dump into MySQL

I'm confused how to import a SQL dump file. I can't seem to import the database without creating the database first in MySQL. This is the error displayed when database_name has not yet been created: username = username of someone with access to the database on the original server. database_name = name of database from the original ser...

mysqldump not working when run from within an ASP .NET web app as a new process

This, when run from the "run" window , works properly. cmd.exe /K mysqldump --add-drop-database --add-drop-table --user=root --password=thepassword --databases theDatabase > C:\Backup\theBackup.sql However, the same command, when I try to execute from my web application by calling an external process, fails. Here's the code: Process...

comparing data from mysql backups

I've got a few backups of my database, and I'm trying to figure out if there is a way to compare the data in the backups to see how the data as changed over time. I do not have a timestamp on the fields I want to compare, but I do have a unique id on the row. The backups are .sql files created by using mysqldump. Is there a process fo...

How to import SQL dump to a table without overwriting duplicate fields

Hi, how do I import a MySQL dump file to a database without overwriting records with the same value? ...

mysqldump or mysqlhotcopy to backup large MySQL database?

I have some NAS storage to do backups to with my dedicated hosting provider. I setup automatic daily backups with WHM to backup the databases and accounts. The server is hosting one site. When it does the backup, it does a mysql dump, and essentially takes the site down for the whole time it is doing the backup because nobody can connect...

How to validate database backups

I have a few remote databases, hosted at my web hosts. For mysql, I use periodic mysqldump and for MSSQL, I use bcp to back them up. How do I validate those backups? How do I make sure that the backup was not partial (its done over the public network). ...

copy MySql DB from one server to another

Hi, I need to copy a MySQL DB from a server on Linux to a server on Windows. I've tried using mysqldump but it doesn't seem to include Stored Procs. I want to copy everything, i.e. schema, data, stored procs, triggers, etc. Thanks, Don ...

How can I get mysqldump to preserve the case of table names?

I'm attempting to migrate a database from a windows to a linux host. Thanks! Ashley ...

mysql backup preserving relationships

Hi, I would like to know how to backup my data from 2 separate tables (CATEGORIES and SUBCATEGORIES, where SUBCATEGORIES belong to a CATEGORY) in such a way that I can restore the relationship at a later time. I am not sure if mysqldump --opt db_name would suffice. Example: Categories: | ID | name ----------- | 1 | Audio | 9 | Video...