public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] MySQL 4.0 => 4.1 upgrade
@ 2005-09-08 11:08 Francesco R
  2005-09-10 16:24 ` Maurice van der Pot
  2005-09-11 16:49 ` Jason Wever
  0 siblings, 2 replies; 18+ messages in thread
From: Francesco R @ 2005-09-08 11:08 UTC (permalink / raw
  To: gentoo-dev

Please notice that MySQL-5.0 has been erroneously unmasked for few hours
but it will return under the package.mask cover at next rsync.

The MySQL herd is pleased to announce that Mysql 4.1 has been unmasked
today and is now marked unstable.
Hope that it's possible to stabilize it soon, here there is a upgrade path.

.-----------------------
| propedeutic readings:

http://dev.mysql.com/doc/mysql/en/upgrading-from-4-0.html
http://dev.mysql.com/doc/mysql/en/news-4-1-x.html
http://dev.mysql.com/doc/mysql/en/replication-upgrade-4-0.html

.---------------
| Upgrade path:

[[[ User with a old (<4.0.24 ??) mysql start from here ]]]

quickpkg dev-db/mysql

cmd# emerge -av --buildpkg =mysql-4.0.25-r2
cmd# ebuild \
     /var/db/pkg/dev-db/mysql-4.0.25-r2/mysql-4.0.25-r2.ebuild config

# Insert some kind of data fex attached "backup_mysql_4.0.sql.gz"

[[[ User with a recent version of mysql start from here ]]]

cmd# mysqldump \
     -uroot \
     -p$PASSWORD \
     -hlocalhost \
     --all-databases \
     --all \
     --opt \
     --allow-keywords \
     --flush-logs \
     --hex-blob \
     --master-data \
     --max_allowed_packet=16M \
     --result-file=BACKUP_MYSQL_4.0.SQL

# check the backup file, try one one load on a mysql-4.0 server

cmd# /etc/init.d/mysql stop
cmd# quickpkg dev-db/mysql
cmd# rm -rf /var/lib/mysql/

[[[ Real upgrade start here ]]]

cmd# emerge -C mysql
cmd# rm -rf /var/lib/mysql/ /var/run/mysqld/ /var/log/mysql
cmd# emerge -av --buildpkg =mysql-4.1.14
cmd# revdep-rebuild
cmd# ebuild /var/db/pkg/dev-db/mysql-4.1.14/mysql-4.1.14.ebuild config
cmd# /etc/init.d/mysql start

cmd# cat backup_mysql_4.0.sql \
     | mysql \
     -uroot \
     -p$PASSWORD \
     -hlocalhost \
     --max_allowed_packet=16M

cmd# mysql_fix_privilege_tables \
     --defaults-file=/etc/mysql/my.cnf \
     --user=root \
     --password=$PASSWORD

cmd# /etc/init.d/mysql restart
------------------------------------------------------------

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade
  2005-09-08 11:08 [gentoo-dev] MySQL 4.0 => 4.1 upgrade Francesco R
@ 2005-09-10 16:24 ` Maurice van der Pot
  2005-09-10 18:03   ` Francesco R
  2005-09-10 22:01   ` Michael Kohl
  2005-09-11 16:49 ` Jason Wever
  1 sibling, 2 replies; 18+ messages in thread
From: Maurice van der Pot @ 2005-09-10 16:24 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 883 bytes --]

Is this path going to be published somewhere or is this mail it?

On Thu, Sep 08, 2005 at 01:08:06PM +0200, Francesco R wrote:
> cmd# ebuild /var/db/pkg/dev-db/mysql-4.1.14/mysql-4.1.14.ebuild config
This asks for a password, but not all passwords can be entered.
Specifically one with a ` in it fails =]

Also, when it outputs:
    "Check the password"
it is asking you to enter the password again. I wasn't sure how to
interpret this, because the password was shown on the screen so it might
have been asking me to verify it and type ok or something.


And here's a character case mismatch:
> --result-file=BACKUP_MYSQL_4.0.SQL
> cmd# cat backup_mysql_4.0.sql \

Regards,
Maurice.

-- 
Maurice van der Pot

Gentoo Linux Developer   griffon26@gentoo.org     http://www.gentoo.org
Creator of BiteMe!       griffon26@kfk4ever.com   http://www.kfk4ever.com


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade
  2005-09-10 16:24 ` Maurice van der Pot
@ 2005-09-10 18:03   ` Francesco R
  2005-09-10 18:23     ` Martin Schlemmer
  2005-09-10 22:01   ` Michael Kohl
  1 sibling, 1 reply; 18+ messages in thread
From: Francesco R @ 2005-09-10 18:03 UTC (permalink / raw
  To: gentoo-dev

Maurice van der Pot wrote:

>Is this path going to be published somewhere or is this mail it?
>  
>
Not from me atm, I feel very bad at writing anglish documentation. An
eventual reader sure feel worst.

>On Thu, Sep 08, 2005 at 01:08:06PM +0200, Francesco R wrote:
>  
>
>>cmd# ebuild /var/db/pkg/dev-db/mysql-4.1.14/mysql-4.1.14.ebuild config
>>    
>>
>This asks for a password, but not all passwords can be entered.
>Specifically one with a ` in it fails =]
>
>Also, when it outputs:
>    "Check the password"
>it is asking you to enter the password again. I wasn't sure how to
>interpret this, because the password was shown on the screen so it might
>have been asking me to verify it and type ok or something.
>  
>
It's a mixture, I've received a suggestion in bugzilla on howto hide the
password, but need to be tested on all platform before.

>
>And here's a character case mismatch:
>  
>
>>--result-file=BACKUP_MYSQL_4.0.SQL
>>cmd# cat backup_mysql_4.0.sql \
>>    
>>
>
>  
>
ach it has been discovered, I was already singing victory.

>Regards,
>Maurice.
>  
>

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade
  2005-09-10 18:03   ` Francesco R
@ 2005-09-10 18:23     ` Martin Schlemmer
  2005-09-11 16:30       ` Francesco R
  0 siblings, 1 reply; 18+ messages in thread
From: Martin Schlemmer @ 2005-09-10 18:23 UTC (permalink / raw
  To: gentoo-dev; +Cc: Francesco R

[-- Attachment #1: Type: text/plain, Size: 1535 bytes --]

On Sat, 2005-09-10 at 20:03 +0200, Francesco R wrote:
> Maurice van der Pot wrote:
> 
> >Is this path going to be published somewhere or is this mail it?
> >  
> >
> Not from me atm, I feel very bad at writing anglish documentation. An
> eventual reader sure feel worst.
> 
> >On Thu, Sep 08, 2005 at 01:08:06PM +0200, Francesco R wrote:
> >  
> >
> >>cmd# ebuild /var/db/pkg/dev-db/mysql-4.1.14/mysql-4.1.14.ebuild config
> >>    
> >>
> >This asks for a password, but not all passwords can be entered.
> >Specifically one with a ` in it fails =]
> >
> >Also, when it outputs:
> >    "Check the password"
> >it is asking you to enter the password again. I wasn't sure how to
> >interpret this, because the password was shown on the screen so it might
> >have been asking me to verify it and type ok or something.
> >  
> >
> It's a mixture, I've received a suggestion in bugzilla on howto hide the
> password, but need to be tested on all platform before.
> 

Just use bash's built-in read function:

-----
local password newpasswd
# Read the password into $password
read -sp "Please enter password: " password
# Just echo a newline so that next output start on new line
echo
# Confirm password into $newpassword
read -sp "Please re-enter password: " newpassword
echo
# Verify that the passwords match
if [[ ${password} != "${newpassword}" ]] ; then
	eerror "Passwords did not match!"
	die "Passwords did not match!"
fi
-----

Or something to that regards.


-- 
Martin Schlemmer


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade
  2005-09-10 16:24 ` Maurice van der Pot
  2005-09-10 18:03   ` Francesco R
@ 2005-09-10 22:01   ` Michael Kohl
  2005-09-11 15:05     ` Francesco R
  1 sibling, 1 reply; 18+ messages in thread
From: Michael Kohl @ 2005-09-10 22:01 UTC (permalink / raw
  To: gentoo-dev

On Sat, 10 Sep 2005 18:24:46 +0200
Maurice van der Pot <griffon26@gentoo.org> wrote:

> Is this path going to be published somewhere or is this mail it?

As Francesco said he won't publish a guide somewhere and I think MySQl
is a widely used package, I decided to write up a little guide:

http://dev.gentoo.org/~citizen428/mysql-update.txt

Yep, it's only plain text, no fancy GuideXML. I'm tired, so the wording
most probably isn't perfect. Still it's better than nothing and you
have a link to give to interested users...

Hope someone finds this useful,
Michael

-- 
web@citizen428.net                                 citizen428@gentoo.org
http://citizen428.net/                http://dev.gentoo.org/~citizen428/
GnuPG key: 0x90CA09E3/4D21 916E DBCE 72B8 CDC5  BD87 DE2D 91A2 90CA 09E3
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade
  2005-09-10 22:01   ` Michael Kohl
@ 2005-09-11 15:05     ` Francesco R
  2005-09-11 16:00       ` Jan Kundrát
                         ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Francesco R @ 2005-09-11 15:05 UTC (permalink / raw
  To: gentoo-dev

Michael Kohl wrote:

>On Sat, 10 Sep 2005 18:24:46 +0200
>Maurice van der Pot <griffon26@gentoo.org> wrote:
>
>  
>
>>Is this path going to be published somewhere or is this mail it?
>>    
>>
>
>As Francesco said he won't publish a guide somewhere and I think MySQl
>is a widely used package, I decided to write up a little guide:
>
>http://dev.gentoo.org/~citizen428/mysql-update.txt
>
>Yep, it's only plain text, no fancy GuideXML. I'm tired, so the wording
>most probably isn't perfect. Still it's better than nothing and you
>have a link to give to interested users...
>  
>
Convert a document from text to xml is something that I can do ;) .

http://dev.gentoo.org/~vivo/doc/mysql-update.html
/home/vivo/public_html/docmysql-update.xml
the xml is chmoded 664, change, destroy, and revert whatever you want there.

It's a extended and reorganized version from your txt doc.

>Hope someone finds this useful,
>  
>
me for sure, thanks a lot.

Documentation herd what now ?
cheers Francesco
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade
  2005-09-11 15:05     ` Francesco R
@ 2005-09-11 16:00       ` Jan Kundrát
  2005-09-11 19:36         ` Jan Kundrát
  2005-09-11 16:02       ` Jason Stubbs
  2005-09-11 16:41       ` Jan Kundrát
  2 siblings, 1 reply; 18+ messages in thread
From: Jan Kundrát @ 2005-09-11 16:00 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 348 bytes --]

Francesco R wrote:
> Documentation herd what now ?

Well, standard procedure is to create bugreport and assign it to the
docs-team@g.o; I don't know how many GDP members read every single
message on this list :-).

-jkt

[apologies if you get this twice; blame thunderbird and/or
suspend2-sources :-)]

-- 
cd /local/pub && more beer > /dev/mouth


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade
  2005-09-11 15:05     ` Francesco R
  2005-09-11 16:00       ` Jan Kundrát
@ 2005-09-11 16:02       ` Jason Stubbs
  2005-09-11 17:51         ` Francesco R
  2005-09-11 16:41       ` Jan Kundrát
  2 siblings, 1 reply; 18+ messages in thread
From: Jason Stubbs @ 2005-09-11 16:02 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 533 bytes --]

On Monday 12 September 2005 00:05, Francesco R wrote:
> http://dev.gentoo.org/~vivo/doc/mysql-update.html

With step 2, you should probably mention the issues that can arise with 
non-ASCII data in char fields. The character set really needs to specified 
in the dump. After the upgrade to 4.1, the default charset of the server 
should be set to something compatible and then the charset of the data 
should be specified to mysql when re-importing the backup.

Just another one of the many gotchas...

-- 
Jason Stubbs

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade
  2005-09-10 18:23     ` Martin Schlemmer
@ 2005-09-11 16:30       ` Francesco R
  0 siblings, 0 replies; 18+ messages in thread
From: Francesco R @ 2005-09-11 16:30 UTC (permalink / raw
  To: gentoo-dev

Martin Schlemmer wrote:
[...]

>Just use bash's built-in read function:
>
>-----
>local password newpasswd
># Read the password into $password
>read -sp "Please enter password: " password
># Just echo a newline so that next output start on new line
>echo
>  
>
[...]

>Or something to that regards.
>  
>
In Cvs, thanks.

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade
  2005-09-11 15:05     ` Francesco R
  2005-09-11 16:00       ` Jan Kundrát
  2005-09-11 16:02       ` Jason Stubbs
@ 2005-09-11 16:41       ` Jan Kundrát
  2 siblings, 0 replies; 18+ messages in thread
From: Jan Kundrát @ 2005-09-11 16:41 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 265 bytes --]

Francesco R wrote:
> Documentation herd what now ?

Well, standard procedure is to create bugreport and assign it to the
docs-team@g.o; I don't know how many GDP members read every single
message on this list :-).

-jkt

-- 
cd /local/pub && more beer > /dev/mouth

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade
  2005-09-08 11:08 [gentoo-dev] MySQL 4.0 => 4.1 upgrade Francesco R
  2005-09-10 16:24 ` Maurice van der Pot
@ 2005-09-11 16:49 ` Jason Wever
  2005-09-11 17:46   ` Francesco R
  1 sibling, 1 reply; 18+ messages in thread
From: Jason Wever @ 2005-09-11 16:49 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 8 Sep 2005, Francesco R wrote:

> Please notice that MySQL-5.0 has been erroneously unmasked for few hours
> but it will return under the package.mask cover at next rsync.
>
> The MySQL herd is pleased to announce that Mysql 4.1 has been unmasked
> today and is now marked unstable.

Is there any particular reason that the utf8 use flag was re-introduced 
rather than using the unicode use flag like everything else does (and was 
standardized on)?

Regards,
- -- 
Jason Wever
Gentoo/Sparc Co-Team Lead
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDJGAcdKvgdVioq28RAqNpAJ9nxomCJzrxwR7KaCJcqo7RxJgf/wCgq0rs
xLmF7FpAQxpzjxDTmgDbIos=
=HXX3
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade
  2005-09-11 16:49 ` Jason Wever
@ 2005-09-11 17:46   ` Francesco R
  2005-09-11 18:19     ` Ciaran McCreesh
  0 siblings, 1 reply; 18+ messages in thread
From: Francesco R @ 2005-09-11 17:46 UTC (permalink / raw
  To: gentoo-dev

Jason Wever wrote:

> On Thu, 8 Sep 2005, Francesco R wrote:
>
> >> Please notice that MySQL-5.0 has been erroneously unmasked for few
> hours
> >> but it will return under the package.mask cover at next rsync.
> >>
> >> The MySQL herd is pleased to announce that Mysql 4.1 has been unmasked
> >> today and is now marked unstable.
>
>
> Is there any particular reason that the utf8 use flag was
> re-introduced rather than using the unicode use flag like everything
> else does (and was standardized on)?

Because it does not "Adds support for Unicode" but "switch default to
utf8 character set" in MySQL config file, it's not possible to
deactivate support for unicode in 4.1 version.

>
> Regards,
> -- Jason Wever
> Gentoo/Sparc Co-Team Lead

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade
  2005-09-11 16:02       ` Jason Stubbs
@ 2005-09-11 17:51         ` Francesco R
  2005-09-12  1:19           ` Jason Stubbs
  0 siblings, 1 reply; 18+ messages in thread
From: Francesco R @ 2005-09-11 17:51 UTC (permalink / raw
  To: gentoo-dev

Jason Stubbs wrote:

>On Monday 12 September 2005 00:05, Francesco R wrote:
>  
>
>>http://dev.gentoo.org/~vivo/doc/mysql-update.html
>>    
>>
>
>With step 2, you should probably mention the issues that can arise with 
>non-ASCII data in char fields. The character set really needs to specified 
>in the dump. After the upgrade to 4.1, the default charset of the server 
>should be set to something compatible and then the charset of the data 
>should be specified to mysql when re-importing the backup.
>  
>
--default-character-set=charset
should be that of my.cnf config file, mysqldump don't permit an atomic
setting of this variable.
The only option for this kind of users is to atomically dump the tables
and then concat the results.

Importing in mysql-4.1 it's ok, provided your default character set is utf8.

Russian, asian whatever person has experience on this please speak now
to correct what affermed here.

>Just another one of the many gotchas...
>
>  
>
expand this please

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade
  2005-09-11 17:46   ` Francesco R
@ 2005-09-11 18:19     ` Ciaran McCreesh
  2005-09-11 18:31       ` Francesco R
  0 siblings, 1 reply; 18+ messages in thread
From: Ciaran McCreesh @ 2005-09-11 18:19 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]

On Sun, 11 Sep 2005 19:46:25 +0200 Francesco R <vivo@gentoo.org> wrote:
| > Is there any particular reason that the utf8 use flag was
| > re-introduced rather than using the unicode use flag like everything
| > else does (and was standardized on)?
| 
| Because it does not "Adds support for Unicode" but "switch default to
| utf8 character set" in MySQL config file, it's not possible to
| deactivate support for unicode in 4.1 version.

Bleh. A USE flag for a configuration file setting? Just install with
sane defaults and let the sysadmin change it if necessary...

-- 
Ciaran McCreesh : Gentoo Developer (Vim, Shell tools, Fluxbox, Cron)
Mail            : ciaranm at gentoo.org
Web             : http://dev.gentoo.org/~ciaranm


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade
  2005-09-11 18:19     ` Ciaran McCreesh
@ 2005-09-11 18:31       ` Francesco R
  0 siblings, 0 replies; 18+ messages in thread
From: Francesco R @ 2005-09-11 18:31 UTC (permalink / raw
  To: gentoo-dev

Ciaran McCreesh wrote:

>On Sun, 11 Sep 2005 19:46:25 +0200 Francesco R <vivo@gentoo.org> wrote:
>| > Is there any particular reason that the utf8 use flag was
>| > re-introduced rather than using the unicode use flag like everything
>| > else does (and was standardized on)?
>| 
>| Because it does not "Adds support for Unicode" but "switch default to
>| utf8 character set" in MySQL config file, it's not possible to
>| deactivate support for unicode in 4.1 version.
>
>Bleh. A USE flag for a configuration file setting? Just install with
>sane defaults and let the sysadmin change it if necessary...
>
>  
>
Agree, all toghether please say that it should be defaulted to "utf8"
also if the previous default was latin1.

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade
  2005-09-11 16:00       ` Jan Kundrát
@ 2005-09-11 19:36         ` Jan Kundrát
  2005-09-11 21:23           ` Łukasz Damentko
  0 siblings, 1 reply; 18+ messages in thread
From: Jan Kundrát @ 2005-09-11 19:36 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 290 bytes --]

Jan Kundrát wrote:
> Well, standard procedure is to create bugreport and assign it to the
> docs-team@g.o; I don't know how many GDP members read every single
> message on this list :-).

http://bugs.gentoo.org/show_bug.cgi?id=105626

-- 
cd /local/pub && more beer > /dev/mouth


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade
  2005-09-11 19:36         ` Jan Kundrát
@ 2005-09-11 21:23           ` Łukasz Damentko
  0 siblings, 0 replies; 18+ messages in thread
From: Łukasz Damentko @ 2005-09-11 21:23 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 11 Sep 2005 21:36:55 +0200
Jan Kundrát <jkt@gentoo.org> wrote:

> Jan Kundrát wrote:
> > Well, standard procedure is to create bugreport and assign it to the
> > docs-team@g.o; I don't know how many GDP members read every single
> > message on this list :-).
> 
> http://bugs.gentoo.org/show_bug.cgi?id=105626


Doc is now published as
http://www.gentoo.org/doc/en/mysql-upgrading.xml, for your reading
pleasure.

with regards,

Łukasz Damentko

- --
GDP mercenary
polish lead translator
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDJKBq8rb4OBjOeLMRAgsOAJ9oLaGe1hA2pXWCBxiQ7e61uab8dwCgtAP9
OEScMme3ahY1PPxlrlyj75Y=
=7pZn
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [gentoo-dev] MySQL 4.0 => 4.1 upgrade
  2005-09-11 17:51         ` Francesco R
@ 2005-09-12  1:19           ` Jason Stubbs
  0 siblings, 0 replies; 18+ messages in thread
From: Jason Stubbs @ 2005-09-12  1:19 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1832 bytes --]

On Monday 12 September 2005 02:51, Francesco R wrote:
> Jason Stubbs wrote:
> >On Monday 12 September 2005 00:05, Francesco R wrote:
> >>http://dev.gentoo.org/~vivo/doc/mysql-update.html
> >
> >With step 2, you should probably mention the issues that can arise with
> >non-ASCII data in char fields. The character set really needs to
> > specified in the dump. After the upgrade to 4.1, the default charset of
> > the server should be set to something compatible and then the charset
> > of the data should be specified to mysql when re-importing the backup.
>
> --default-character-set=charset
> should be that of my.cnf config file, mysqldump don't permit an atomic
> setting of this variable.
> The only option for this kind of users is to atomically dump the tables
> and then concat the results.
>
> Importing in mysql-4.1 it's ok, provided your default character set is
> utf8.
>
> Russian, asian whatever person has experience on this please speak now
> to correct what affermed here.

I had a 4.0 database with strings mostly stored in SJIS that I upgraded to 
4.1 a while back. 4.1 then uses the "connection characater set" to do on 
the fly translation of db encoding to connection encoding. This also 
happens when importing data so if you haven't got the character set of the 
data correct, it'll get corrupted on the way in.

Related to the automatic conversion, some fields in the DB contain raw URLs 
with un-URL-ified parameters that can be in any character set. These fields 
had to be set to BINARY for them to be usable.

Another gotcha related to this is that php's mysql support defaults to 
latin-1 encoding (at least on my current installation) and has no setting 
for it. The only solution there was to execute "SET NAMES ujis" on every 
connection.

-- 
Jason Stubbs

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2005-09-12  1:21 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-08 11:08 [gentoo-dev] MySQL 4.0 => 4.1 upgrade Francesco R
2005-09-10 16:24 ` Maurice van der Pot
2005-09-10 18:03   ` Francesco R
2005-09-10 18:23     ` Martin Schlemmer
2005-09-11 16:30       ` Francesco R
2005-09-10 22:01   ` Michael Kohl
2005-09-11 15:05     ` Francesco R
2005-09-11 16:00       ` Jan Kundrát
2005-09-11 19:36         ` Jan Kundrát
2005-09-11 21:23           ` Łukasz Damentko
2005-09-11 16:02       ` Jason Stubbs
2005-09-11 17:51         ` Francesco R
2005-09-12  1:19           ` Jason Stubbs
2005-09-11 16:41       ` Jan Kundrát
2005-09-11 16:49 ` Jason Wever
2005-09-11 17:46   ` Francesco R
2005-09-11 18:19     ` Ciaran McCreesh
2005-09-11 18:31       ` Francesco R

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox