mysqldump

Problem with restoring MySQL database - mysqldump question

I made a backup of my_database like this: mysqldump --add-drop-database --databases --user=my_username --password=my_password my_database > backup.sql Then I deleted the database completely, and tried to restore it like this: mysql --user=my_username --password=my_password my_database < backup.sql I got the following err...

Problem with mysqldump: "--defaults-extra-file" option is not working as expected

I run the following command from the Windows command line to backup my database: ...\right_path\mysqldump --add-drop-database --databases my_database_name --defaults-extra-file=d:\1.cnf where d:\1.cnf contains the following: [client] user="my_user" password="my_password" Unfortunately, I got the following e...

How do I see the differences between 2 MySQL dumps?

I have 2 MySQL dump files. I want to find the table data difference between 2 tables. ...

Where I can find a list of "mysqldump" exit codes ?

I know that exit code = 0 means No error. I got exit code = 2. What does it means ? Where I can see the complete list of mysqldump exit codes ? ...

mysql backup issue

Hello I've performed mysqldump -uroot --add-drop-table --default-character-set=latin1 dbname >/backup/new.sql DB 7GB issue it take tooo much and the output is still 0 size , and mysqladmin processlist show | 8219 | root | localhost | dbname | Query | 1413 | | LOCK TABLES `wp_10000_comments` READ /*!32311 LOCAL */,`wp_10000_...

about mysqldump export index info

mysqldump -u root -p123 --opt --quick --database search > ./test.sql i have used mysqldump export data & schema from db,but it seems didn't contains index infomation? how can i add this to export sql file? ...

mysql - adding/concatenating text values within a SELECT clause

Is there a way in MySQL to concatenate text to values using a SELECT statement? (like in Oracle) For example, in Oracle you can write something like this: SQL> select 'The Year is '|| year, 'The month is '|| month from time where rownum < 2; 'THEYEARIS'||YEAR ---------------------------------------------------- 'THEMONTHIS'||MONTH ---...

Create MySQL database on server

I'm following a tutorial for constructing a PHP and MySQL ecommerce driven website, and I'm uploading them to my server at the moment, but in need of some assistance determining how to proceed. In the README of the tutorial, are the following instructions: INSTALLATION INSTRUCTIONS 1.) Unzip plaincart.zip to the root folder under your...

mysqldump and database users...

Alright, Let me preface this with the fact that I'm assuming I am lacking a fundamental understanding of mysql. I'm attempting to assemble all the options that I need for mysqldump to create everything used by my applications database into a single script. This includes the database itself and all the database users/passwords/privileg...

How to dump data from mysql database to postgresql database?

I have done the depot application using mysql... Now i am in need to use postgres... So i need to dump data from mysql database "depot_development" to postgres database "depot_develop"... ...

How to Exclude Data for Specific Tables

I am using mysqldump to create a canonical installation script for a MySQL database. I would like to dump the data for able half of the tables in the database, but exclude the data from the other tables. I am aware of the following two commands: --no-data --ignore-table But the first applies to all tables, and I believe the second exc...

mysqldump Fully Qualifies Triggers with Database Name

I'm am trying to use mysqldump to export a database which needs to be imported using a different database name. Looking at the SQL generated by mysqldump, it appears that triggers are the only object names which are fully-qualified with the source database name thus foiling my needs. Is there anyway to direct mysqldump to not fully-quali...

MySQLdump define the path

I'm trying to backup a MySQL database: $ mysqldump -u ruby -p idm_production > /home/username/idm_backup_2010_10_23.sql Enter password: mysqldump: mysqldump: Couldn't execute 'show fields from arguments': Can't create/write to file '/tmp/#sql_721_0.MYI' (Errcode: 13) (1) However I don't seem to have permission to write the the /tm...

Unreasonable difference between MySQL dump and load times

I'm dumping a database into a file (piping the dump through gzip) and it takes about 2 minutes to create a 300MB dump.sql.gz file. When loading the file back into MySQL (the dump begins with dropping the tables), the load takes around 30 minutes!! What can be the reason for such a huge difference in times? Are there any general tips fo...

how to get remote mysql database dump to my local machine ?

Hi, I have remote server credentials and mysql root password. When I access remote machine and trying to take dump it throws "'Got error 28 from storage engine' when trying to dump tablespaces". So I plan to take the dump from my local machine. So,how can I take the database dump. Thanks in advance! ...

Simple way to automatically convert INSERT statements to UPDATEs?

I want to use the output of mysqldump to update entries in a live database. I don't want to delete the entries first, simple update statements are fine. Is there a simple way to convert the output of mysqldump which contains INSERT statements to the corresponding UPDATE statements? It seems such a basic feature, so I'm sure someone crea...

is there a mysqldump option for "Maximal length of created query" which I noticed in phpmyadmin?

I am getting server has gone away errors when i try to re import a database created with mysqldump. I don't get that error when I export from phpmyadmin. I am trying to mimic the phpmyadmin export output with mysqldump. phpmyadmin has something called "Maximal length of created query" set to 50000. What option does that translate to in ...

How to do a mysqldump with a use database in the dump

So the command I normally use to get a database sent to another server is: mysqldump -u user -p --add-drop-tables database *file* But I always have to go into the file and add a line at the top: use database; So that I use the file to import to a different server. Is there a flag in mysqldump to automatically add the use database? ...