~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/clients/drizzledump.rst

  • Committer: Lee Bieber
  • Date: 2011-02-14 19:50:07 UTC
  • mfrom: (2167.1.3 build)
  • Revision ID: kalebral@gmail.com-20110214195007-om9fjrqy5ziqwrlw
Merge Andrew - 718224: Minor changes to migration docs needed 
Merge Olaf - updating old style casts
Merge Olaf - drizzletest re-factoring

Show diffs side-by-side

added added

removed removed

Lines of Context:
260
260
:program:`drizzledump` will automatically detect whether it is talking to a
261
261
MySQL or Drizzle database server.  If it is connected to a MySQL server it will
262
262
automatically convert all the structures and data into a Drizzle compatible 
263
 
format.  It will, however, by default try to connect via. port 4427 so to
264
 
connect to a MySQL server a port must be specified.
 
263
format.
 
264
 
 
265
.. warning::
 
266
 
 
267
   :program:`drizzledump` will by default try to connect via. port 4427 so to
 
268
   connect to a MySQL server a port (such as 3306) must be specified.
265
269
 
266
270
So, simply connecting to a MySQL server with :program:`drizzledump` as follows
267
271
will give you a Drizzle compatible output::
273
277
 
274
278
$ drizzledump --all-databases --host=mysql-host --port=3306 --user=mysql-user --password --destination-type=database --desination-host=drizzle-host
275
279
 
276
 
Please take special note of :ref:`old-passwords-label` if you have connection
277
 
issues from :program:`drizzledump` to your MySQL server.
278
 
 
279
 
If you find your VARCHAR and TEXT data does not look correct in a drizzledump
280
 
output, it is likely that you have UTF8 data stored in a non-UTF8 table.  In
281
 
which case please check the :option:`--my-data-is-mangled` option.
 
280
.. note::
 
281
 
 
282
   Please take special note of :ref:`old-passwords-label` if you have connection
 
283
   issues from :program:`drizzledump` to your MySQL server.
 
284
 
 
285
.. note::
 
286
   If you find your VARCHAR and TEXT data does not look correct in a drizzledump
 
287
   output, it is likely that you have UTF8 data stored in a non-UTF8 table.  In
 
288
   which case please check the :option:`--my-data-is-mangled` option.
282
289
 
283
290
When you migrate from MySQL to Drizzle, the following conversions are required:
284
291
 
294
301
 * tinyblob -> blob
295
302
 * mediumblob -> blob
296
303
 * longblob -> blob
297
 
 * time -> int (of seconds)
298
304
 * year -> int
299
305
 * set -> text
300
306
 * date/datetime default 0000-00-00 -> default NULL (Currently, ALL date columns have their DEFAULT set to NULL on migration)
301
307
 * date/datetime NOT NULL columns -> NULL
302
308
 * any date data containing 0000-00-00 -> NULL
303
 
 * TIME -> INT of the number of seconds*
 
309
 * time -> int of the number of seconds [1]_
304
310
 * enum-> DEFAULT NULL
305
311
 
306
 
* This prevents data loss since MySQL's TIME data type has a range of -838:59:59 - 838:59:59, and Drizzle's TIME type has a range of 00:00:00 - 23:59:61.999999.
 
312
.. rubric:: Footnotes
 
313
 
 
314
.. [1] This prevents data loss since MySQL's TIME data type has a range of
 
315
       -838:59:59 - 838:59:59, and Drizzle's TIME type has a range of
 
316
       00:00:00 - 23:59:61.999999.