Hi all,
My company's currently moving our databases around, shifting one set of tables out from the old MySQL instance into the new. We've done some development prior to this migration, and some tables' structure has been altered from the original (eg. columns were dropped).
So currently I've dumped the data from the old database and ...
I couldn't find any information about how to dump a MySQL database with an ant task.
Do I have to create my own task to do this?
ANT script ===generate==> myDataBase.sql
...
according to the MySQL Certification Guide, when --tab option is used,
a SELECT ... INTO OUTFILE is used to generate a tab delimited file in the specified directory, a file containing SQL (CREATE TABLE) will also be generated
and that
using --tab to produce tab-delimited dump files is much faster
but how can it be faster if both gen...
I have the following:
mysqldump -u xxxx
-h localhost
--password=xxxxx databasename |
ssh [email protected] "dd of=httpdocs/backup`date +'%Y-%m-%d-%H-%M-%S'`.sql"
...which SSH's a mysqldump to a remote machine.
I need to compress the mysqldump before it is SSH'd as the dump is 500mb and its e...
I have the following dump:
CREATE TABLE `testdata`.`carer` (
`ID` bigint(20) NOT NULL auto_increment,
`IS_DELETED` bit(1) default NULL,
`name` varchar(255) default NULL,
`account_id` bigint(20) NOT NULL,
`patient_carer_id` bigint(20) NOT NULL,
PRIMARY KEY (`ID`),
KEY `FK5A0E781D4C45C51` (`patient_carer_id`),
KEY `FK5A0...
I am trying to write a PHP program to automatically created backups of MySQL tables as sql files on the server:
$backup = "$path/$tablename.sql";
$table = "mydbname.mytablename";
exec(
sprintf(
'/usr/bin/mysqldump --host=%s --user=%s --password=%s %s --quick --lock-tables --add-drop-table > %s',
$host,
$user,
$passw...
I used mysqlhotcopy to dump a database full of tables. I know have various .frm, .MYD, and .MYI files that I need to import into a different instance of MySQL. Do I just copy these files into a specific folder on the 2nd system, or do I have to run mysqlhotcopy with another command line option to perform the import?
...
Hello,
I did find other posts similar to this, but wanted a little extra information on these options of mysqldump. I have understood that the --single-transaction and --lock-tables are mutually exclusive operations. Following are my questions regarding these options.
a) Suppose I have chosen to use --lock-tables option. In this case t...
How can I dump database schema to MySQL database with Java JDBC conncetor? I have my database schema in text file.
...
I am currently running mysqldump on a Mysql slave to backup our database. This has worked fine for backing up our data itself, but what I would like to supplement it with is the binary log position of the master that corresponds with the data generated by the mysqldump.
Doing this would allow us to restore our slave (or setup new slave...
ok, say you have two dbs. one you use as a master template which goes through various revisions, let’s say we’re now on revision 3. but the second db is a copy of the template as it was at revision 1.
because db 2 is in use, you don’t want to drop any tables, but you do need to update the structure of the entire db to the latest version...
I am looking for a library that will allow me to read a mysql dump.
I don't want to have to create a MySQL database and import the library and use the MySQL API. I would prefer simply a library that can parse the mysql dump format.
I prefer a python library, but other scripting languages are okay.
...
What are some options to avoid the latency of pointing local django development servers to a remote MySQL database?
If developers use local MySQL databases to avoid the latency, what are some useful tools to sync schema updates of the remote db with the local db and avoid manually creating, downloading, and loading dumps?
Thanks!
...
Hi,
I want to back up only the Views with mysqldump.
Is this possible?
If so, how?
...
I have a typical dev scenario: I have a SQL 2008 database that I want to copy every so often to my local instance of 2008 Express so that I can do dev, make changes, etc. to the local copy. I have some constraints though: the source db is part of a live e-commerce site in shared hosting so I can't detach it and the hosting service wants ...
I just used the MySQL mysqldump tool to generate DDL so I could create the sane database on another machine. When I try to run it on the target machine I get this error:
Script line: 28 Key column 'friendPrimaryKeyInYour Phone' doesn't exist in table
running this statement:
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `f...
When i try to get a dump of a mysql database, the dump stops when a row in it is updated. How can i prevent that? I already tried following options with no result:
-f (forces continu even when error)
-x (lock all tables)
when i log any error, i get nothing
Command i'm using:
mysqldump --user=* --password=* --all-databases --log-e...
My database has 3 tables: table1, table2 and table3
I would like to do a mysqldump on this database with the following conditions:
Dump structure for all tables
Only dump data for table1 and table2, ignore data in table3
Currently, I do this with 2 mysqldump statements
mysqldump -u user -p -d db > db_structure.sql
mysqldump -u user...
I dumped a DB from the production:
mysqldump -u user_name -p intranet2 > intranet2.sql
into the development server:
mysql -u user_name -p intranet2 < intranet2.sql
and I get this:
ERROR 1005 (HY000) at line 244: Can't create table './intranet2/dept.frm' (errno: 150)
I tried to put this in the beginning of the sql file:
SET FOREIGN...
When I call mysqldump from a controller or model I need to fully path the binary, when I call it from Rake I don't need to.
If I do not fully path I get a zero byte file...
I can confirm both processes are run using the same user.
# Works in a controller, model and Rake task
system "/usr/local/mysql/bin/mysqldump -u root #{w.database_...