200
200
.. versionadded:: 2010-09-27
202
.. option:: --my-data-is-mangled
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.
209
This typically happens with PHP apps that do not use 'SET NAMES'.
211
In these cases setting this option will retrieve the data as you see it in your
214
.. versionadded:: 2011-01-31
216
202
.. option:: -h, --host hostname (=localhost)
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.
266
251
So, simply connecting to a MySQL server with :program:`drizzledump` as follows
267
252
will give you a Drizzle compatible output::
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
271
256
Additionally :program:`drizzledump` can now dump from MySQL and import directly
272
257
into a Drizzle server as follows::
274
$ drizzledump --all-databases --host=mysql-host --port=3306 --user=mysql-user --password --destination-type=database --desination-host=drizzle-host
276
Please take special note of :ref:`old-passwords-label` if you have connection
277
issues from :program:`drizzledump` to your MySQL server.
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
283
261
When you migrate from MySQL to Drizzle, the following conversions are required:
286
* FullText -> drop it (with stderr warning)
287
* int unsigned -> bigint
297
* time -> int (of seconds)
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
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.
264
FullText -> drop it (with stderr warning)
265
int unsigned -> bigint
275
time -> int (of seconds)
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
b'\\ No newline at end of file'