~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/clients/drizzledump.rst

  • Committer: Stewart Smith
  • Date: 2011-01-14 05:14:53 UTC
  • mto: (2086.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 2087.
  • Revision ID: stewart@flamingspork.com-20110114051453-q8nkbvby6n12cpqw
add some FIXMEs to ORDER BY docs about what should be added.

Show diffs side-by-side

added added

removed removed

Lines of Context:
199
199
 
200
200
.. versionadded:: 2010-09-27
201
201
 
202
 
.. option:: --my-data-is-mangled
203
 
 
204
 
If your data is UTF8 but has been stored in a latin1 table using a latin1
205
 
connection then corruption is likely and drizzledump by default will retrieve
206
 
mangled data.  This is because MySQL will convert the data to UTF8 on the way
207
 
out to drizzledump and you effectively get a double-conversion to UTF8.
208
 
 
209
 
This typically happens with PHP apps that do not use 'SET NAMES'.
210
 
 
211
 
In these cases setting this option will retrieve the data as you see it in your
212
 
application.
213
 
 
214
 
.. versionadded:: 2011-01-31
215
 
 
216
202
.. option:: -h, --host hostname (=localhost)
217
203
 
218
204
The hostname of the database server.
260
246
:program:`drizzledump` will automatically detect whether it is talking to a
261
247
MySQL or Drizzle database server.  If it is connected to a MySQL server it will
262
248
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.
 
249
format.
265
250
 
266
251
So, simply connecting to a MySQL server with :program:`drizzledump` as follows
267
252
will give you a Drizzle compatible output::
268
253
 
269
 
$ drizzledump --all-databases --host=mysql-host --port=3306 --user=mysql-user --password > dumpfile.sql
 
254
$ drizzledump --all-databases --host=mysql-host --user=mysql-user --password > dumpfile.sql
270
255
 
271
256
Additionally :program:`drizzledump` can now dump from MySQL and import directly
272
257
into a Drizzle server as follows::
273
258
 
274
 
$ drizzledump --all-databases --host=mysql-host --port=3306 --user=mysql-user --password --destination-type=database --desination-host=drizzle-host
275
 
 
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.
 
259
$ drizzledump --all-databases --host=mysql-host --user=mysql-user --password --destination-type=database --desination-host=drizzle-host
282
260
 
283
261
When you migrate from MySQL to Drizzle, the following conversions are required:
284
262
 
285
 
 * MyISAM -> InnoDB
286
 
 * FullText -> drop it (with stderr warning)
287
 
 * int unsigned -> bigint
288
 
 * tinyint -> int
289
 
 * smallint -> int
290
 
 * mediumint -> int
291
 
 * tinytext -> text
292
 
 * mediumtext -> text
293
 
 * longtext -> text
294
 
 * tinyblob -> blob
295
 
 * mediumblob -> blob
296
 
 * longblob -> blob
297
 
 * time -> int (of seconds)
298
 
 * year -> int
299
 
 * set -> text
300
 
 * date/datetime default 0000-00-00 -> default NULL (Currently, ALL date columns have their DEFAULT set to NULL on migration)
301
 
 * date/datetime NOT NULL columns -> NULL
302
 
 * any date data containing 0000-00-00 -> NULL
303
 
 * TIME -> INT of the number of seconds*
304
 
 * enum-> DEFAULT NULL
305
 
 
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.
 
263
MyISAM -> InnoDB
 
264
FullText -> drop it (with stderr warning)
 
265
int unsigned -> bigint
 
266
tinyint -> int
 
267
smallint -> int
 
268
mediumint -> int
 
269
tinytext -> text
 
270
mediumtext -> text
 
271
longtext -> text
 
272
tinyblob -> blob
 
273
mediumblob -> blob
 
274
longblob -> blob
 
275
time -> int (of seconds)
 
276
year -> int
 
277
set -> text
 
278
date/datetime default 0000-00-00 -> default NULL (Currently, ALL date columns have their DEFAULT set to NULL on migration)
 
279
date/datetime NOT NULL columns -> NULL
 
280
any date data containing 0000-00-00 -> NULL
 
281
enum-> DEFAULT NULL
 
 
b'\\ No newline at end of file'