Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
åäö in mysql problem
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
SoylentGreen
l33t
l33t


Joined: 19 Aug 2005
Posts: 904
Location: The Hostel

PostPosted: Thu Apr 13, 2006 11:27 am    Post subject: 4.1.14 my.cnf Reply with quote

Code:

# /etc/mysql/my.cnf: The global mysql configuration file.
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-4.1,v 1.2 2005/07/26 17:14:23 vivo Exp $

# The following options will be passed to all MySQL clients
[client]
#password               = your_password
port                  = 3306
socket                  = /var/run/mysqld/mysqld.sock

[mysql]
character-sets-dir=latin1
default-character-set=latin1

[mysqladmin]
character-sets-dir=latin1
default-character-set=latin1

[mysqlcheck]
character-sets-dir=latin1
default-character-set=latin1

[mysqldump]
character-sets-dir=latin1
default-character-set=latin1

[mysqlimport]
character-sets-dir=latin1
default-character-set=latin1

[mysqlshow]
character-sets-dir=latin1
default-character-set=latin1

[myisamchk]
character-sets-dir=latin1

[myisampack]
character-sets-dir=latin1

# use [safe_mysqld] with mysql-3
[mysqld_safe]
err-log                  = /var/log/mysql/mysql.err

# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations.
[mysqld]
character-set-server      = latin1
default-character-set      = latin1
user                   = mysql
port                   = 3306
socket                   = /var/run/mysqld/mysqld.sock
pid-file                = /var/run/mysqld/mysqld.pid
log-error                = /var/log/mysql/mysqld.err
basedir                = /usr
datadir                = /var/lib/mysql
skip-locking
#skip-innodb
key_buffer                = 16M
max_allowed_packet          = 1M
table_cache             = 64
sort_buffer_size          = 512K
net_buffer_length          = 8K
read_buffer_size          = 256K
read_rnd_buffer_size       = 512K
myisam_sort_buffer_size    = 8M
language                = /usr/share/mysql/english

#security:
#using "localhost" in connects use sockets by default
#skip-networking
bind-address            = 127.0.0.1

log-bin
server-id                = 1

# Point the following paths to different dedicated disks
tmpdir                   = /tmp/
#log-update             = /path-to-dedicated-directory/hostname

# you need debug use flag enabled to use this ones.
# if needed uncomment them, start the server and issue
# #tail -f /tmp/mysqld.sql /tmp/mysqld.trace
# this will show you *exactly* what's appening in your server ;)

#log                  = /tmp/mysqld.sql
#gdb
#debug                  = d:t:i:o,/tmp/mysqld.trace
#one-thread

# Uncomment the following if you are using BDB tables
#bdb_cache_size            = 4M
#bdb_max_lock            = 10000

# The following is the InnoDB configuration
# if you wish to disable innodb instead
# uncomment just the next line
#skip-innodb
#
# the rest of the innodb config follows:
# don't eat too much memory, we're trying to be safe on 64Mb boxes.
# you might want to bump this up a bit on boxes with more RAM
innodb_buffer_pool_size      = 16M
# this is the default, increase if you have lots of tables
innodb_additional_mem_pool_size   = 2M
#
# i'd like to use /var/lib/mysql/innodb, but that is seen as a database :-(
# and upstream wants things to be under /var/lib/mysql/, so that's the route
# we have to take for the moment
#innodb_data_home_dir      = /var/lib/mysql/
#innodb_log_arch_dir      = /var/lib/mysql/
#innodb_log_group_home_dir   = /var/lib/mysql/
# you may wish to change this size to be more suitable for your system
# the max is there to avoid run-away growth on your machine
innodb_data_file_path      = ibdata1:10M:autoextend
# we keep this at around 25% of of innodb_buffer_pool_size
# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
innodb_log_file_size      = 5M
# this is the default, increase if you have very large transactions.
innodb_log_buffer_size      = 8M
# this is the default, and won't hurt you.
# you shouldn't need to tweak it.
set-variable            = innodb_log_files_in_group=2
# see the innodb config docs, the other options are not always safe
innodb_flush_log_at_trx_commit   = 1
innodb_lock_wait_timeout   = 50


[mysqldump]
quick
max_allowed_packet          = 16M

[mysql]
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer                = 20M
sort_buffer_size          = 20M
read_buffer             = 2M
write_buffer             = 2M

[myisamchk]
key_buffer                = 20M
sort_buffer_size          = 20M
read_buffer             = 2M
write_buffer             = 2M

[mysqlhotcopy]
interactive-timeout

#vim: set tabstop=4 :
#vim: set shiftwidth=4 :

Back to top
View user's profile Send private message
wandra
n00b
n00b


Joined: 24 May 2005
Posts: 25

PostPosted: Thu Apr 13, 2006 12:14 pm    Post subject: Reply with quote

see , hope id helps !

https://bugs.gentoo.org/show_bug.cgi?id=129761
Back to top
View user's profile Send private message
SoylentGreen
l33t
l33t


Joined: 19 Aug 2005
Posts: 904
Location: The Hostel

PostPosted: Thu Apr 13, 2006 12:39 pm    Post subject: Reply with quote

wandra wrote:
see , hope id helps !
https://bugs.gentoo.org/show_bug.cgi?id=129761

of course i already tried that (even prior to the post) setting everything back to iso in my.cnf. with the result that i was unable to login as admin in phpBB. i got "invalid_session" :twisted:
yes, i deleted my cookies etc.. pp - no go.
i was even unable to logoff as user from phpBB, once i was logged on. even with cookies disabled.
:twisted: :twisted: :twisted:
Back to top
View user's profile Send private message
SoylentGreen
l33t
l33t


Joined: 19 Aug 2005
Posts: 904
Location: The Hostel

PostPosted: Thu Apr 13, 2006 12:59 pm    Post subject: Reply with quote

btw.. whats this security risk in 4.1.14 they talk about on bugs.gentoo.org? i see no GLSA about this. just curious 8O
Back to top
View user's profile Send private message
spottraining
n00b
n00b


Joined: 30 Jan 2005
Posts: 73
Location: Estonia

PostPosted: Thu Apr 13, 2006 1:18 pm    Post subject: Reply with quote

wandra wrote:
see , hope id helps !

https://bugs.gentoo.org/show_bug.cgi?id=129761

thats help to me.

Thanks
_________________
Sorry about bad English - I am learning....

The box said Windows XP or better, so I installed Linux
Back to top
View user's profile Send private message
SoylentGreen
l33t
l33t


Joined: 19 Aug 2005
Posts: 904
Location: The Hostel

PostPosted: Thu Apr 13, 2006 1:25 pm    Post subject: Reply with quote

spottraining wrote:
wandra wrote:
see , hope id helps !

https://bugs.gentoo.org/show_bug.cgi?id=129761

thats help to me.

are you running phpBB? if so, are you still able to post "umlauts" to phpBB and are able to login to the admin interface?
Back to top
View user's profile Send private message
wandra
n00b
n00b


Joined: 24 May 2005
Posts: 25

PostPosted: Thu Apr 13, 2006 1:29 pm    Post subject: TEMPORARY SOLUTIONs hopefully for all !!! Reply with quote

> my.cnf settings change and mysql restart
> don't change anything
>
> i would like to revert to
> mysql-4.1.14 in the meantime , but emerge doesn't show that any more

so, here for me

https://bugs.gentoo.org/show_bug.cgi?id=129761

has worked perfectly as temporary solution ... restart mysql and go
with typo3 cache had to be cleared

>
> help appreciated, yours
>

vivo says the following ::

-----------------------------

I've readded dev-db/mysql-4.1.14 to the tree, it's package masked so the
procedure to emerge it is slightely more complex.

echo "=dev-db/mysql-4.1.14" >> /etc/portage/package.unmask
emerge =dev-db/mysql-4.1.14

that's all, the commit will take some time to propagate (hours)
If you're in a hurry, copy /usr/portage/dev-db/mysql somewhere,
set PORTDIR_OVERLAY to "somewhere",
download
"http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/dev-db/mysql/mysql-4.1.14.ebuild"
put it in the overlay dev-db dir
run:
ebuild mysql-4.1.14.ebuild digest
emerge =dev-db/mysql-4.1.14
Back to top
View user's profile Send private message
SoylentGreen
l33t
l33t


Joined: 19 Aug 2005
Posts: 904
Location: The Hostel

PostPosted: Thu Apr 13, 2006 2:17 pm    Post subject: Reply with quote

well, reverting back to 4.1.14 was what i mentioned. excuse me - walter, what are you telling us?
does the eclass patch work for you, and you are running a phpBB board, or did you (like me) went back to 4.1.14 and unmerged the -r1 version?

i am still puzzled 8O
Back to top
View user's profile Send private message
spottraining
n00b
n00b


Joined: 30 Jan 2005
Posts: 73
Location: Estonia

PostPosted: Thu Apr 13, 2006 2:18 pm    Post subject: Reply with quote

SoylentGreen wrote:
spottraining wrote:
wandra wrote:
see , hope id helps !

https://bugs.gentoo.org/show_bug.cgi?id=129761

thats help to me.

are you running phpBB? if so, are you still able to post "umlauts" to phpBB and are able to login to the admin interface?

yes
In my server is multiple phpBB and phpBB Plus forums/portals, also some other sites (MediaWiki/WordPress and so on)
_________________
Sorry about bad English - I am learning....

The box said Windows XP or better, so I installed Linux
Back to top
View user's profile Send private message
Sabishii-ookami
n00b
n00b


Joined: 15 Mar 2005
Posts: 36

PostPosted: Thu Apr 13, 2006 2:52 pm    Post subject: Reply with quote

The same happened to me. It's definitively NOT a php problem for me. I upgraded yesterday to dev-db/mysql-5.0.19-r1 from dev-db/mysql-5.0.19. Only problem, after that upgrade, EVERY ACCENTS are screwed up. For example I get : mes échéanciers instead of : mes échéanciers.

PHP didn't upgrade, I get this even when I look from the mysql prompt. This is a big problem for me, since I have a Web server which uses mysql and I can't downgrade, you guys removed dev-db/mysql-5.0.19...

Thanks for the help, it's greatly appreciated!
Back to top
View user's profile Send private message
mfocker
n00b
n00b


Joined: 20 Sep 2005
Posts: 41
Location: Sweden

PostPosted: Thu Apr 13, 2006 3:13 pm    Post subject: Re: 4.1.14 ebuild Reply with quote

Jezuz! Could not log in to my local wordpress site. Drupal got all f*cked up. :?
Got it working again after a re-install (downgrade) with the above mysql-4.1.14.ebuild, thanks! :)
_________________
AMD Opteron 165, Gentoo Linux x86_64
Back to top
View user's profile Send private message
llongi
Retired Dev
Retired Dev


Joined: 15 Apr 2004
Posts: 459
Location: Switzerland

PostPosted: Thu Apr 13, 2006 3:15 pm    Post subject: Reply with quote

We had a bug in the eclass, this bug made all older versions compile with latin1 as default charset. This was wrong. We fixed it, now the -r1's compile correctly with utf8 as default charset. Problem: your databases are in latin1 format. Solution: set the defatult-character-set in my.cnf to latin1. BUT this fixes it only for the mysql* stuff, PHP doesn't read my.cnf, so it tries to interpret stuff now as utf8, but you data is latin1 encoded --> TROUBLE! The fix we're working on is to make PHP read too my.cnf, so that if there you set latin1 as default, it will indeed use latin1 too. This may take a while to be done and tested et all, it was a problem we didn't foresee, sorry for that. Once all is ready and working as expected, PHP and MySQL will be both revbumped, the goal once that is done is the following: new installs will use utf8 for both PHP and MySQL, and that's it. For people like you that have still latin1 databases around, you then just need to set it in my.cnf, and it will work.
_________________
Best regards, Luca.
Back to top
View user's profile Send private message
SoylentGreen
l33t
l33t


Joined: 19 Aug 2005
Posts: 904
Location: The Hostel

PostPosted: Thu Apr 13, 2006 3:25 pm    Post subject: Reply with quote

again: what are those security risks in 4.1.14, that 4.1.14-r1 solves?
would someone please clarify this finally :evil:

tell me a reason why 4.1.14 is hardmasked now. (as stated by the ebuild author on bugs.gentoo.org).
upgradeing from 4.1.14 to 4.1.14-r1 is a minor upgrade. you usually are safe to run that upgrade - no?

if the ebuild author did a booboo, no problem, just tell so. as i already mentioned - shit happens.
but dont keep people in the dark explaining there is a security risk, without nameing it.

this sucks! :twisted:
Back to top
View user's profile Send private message
SoylentGreen
l33t
l33t


Joined: 19 Aug 2005
Posts: 904
Location: The Hostel

PostPosted: Thu Apr 13, 2006 3:30 pm    Post subject: Reply with quote

CHTEKK wrote:
The fix we're working on is to make PHP read too my.cnf

we already underestood this one, but what happens to data in the mysql base, already entered in ISO-xxx format?
that data will not convert onthefly, will it?
ever checked it out? you would be forced to edit every single posting!
Back to top
View user's profile Send private message
SoylentGreen
l33t
l33t


Joined: 19 Aug 2005
Posts: 904
Location: The Hostel

PostPosted: Thu Apr 13, 2006 3:36 pm    Post subject: Re: 4.1.14 ebuild Reply with quote

mfocker wrote:

Got it working again after a re-install (downgrade) with the above mysql-4.1.14.ebuild, thanks! :)

you are welcome!

duh! i am running wordpress as well. but didnt check, it was enough for me to see phpBB behaveing wrongly :twisted:
OTOH, coppermine was still behaveing correct. well, it is set to UTF-8 by default.

and again: where is the security risk in 4.1.14 that -r1 [stable!] fixes.
Back to top
View user's profile Send private message
Sabishii-ookami
n00b
n00b


Joined: 15 Mar 2005
Posts: 36

PostPosted: Thu Apr 13, 2006 3:42 pm    Post subject: Reply with quote

I changed the eclass for now, it's currently recompiling. I'll see if I can convert from latin1 to utf8 at a later point. I really need it to be working for now. Thanks for the clarification.
Back to top
View user's profile Send private message
SoylentGreen
l33t
l33t


Joined: 19 Aug 2005
Posts: 904
Location: The Hostel

PostPosted: Thu Apr 13, 2006 3:54 pm    Post subject: Reply with quote

i fail to see how we could convert our DATA aleady in the mysql base 8O
Back to top
View user's profile Send private message
llongi
Retired Dev
Retired Dev


Joined: 15 Apr 2004
Posts: 459
Location: Switzerland

PostPosted: Thu Apr 13, 2006 4:37 pm    Post subject: Reply with quote

The two bugs that mainly made -r1 necessary are the following:

https://bugs.gentoo.org/show_bug.cgi?id=128713 (the security issue)
https://bugs.gentoo.org/show_bug.cgi?id=126054

Now, don't worry about the data you have in your databases, your databases are latin1 and will remain so, it won't "magically convert on the fly". Only way to port db's to other charsets is to dump them, convert them with tools like iconv and reimport them.
_________________
Best regards, Luca.
Back to top
View user's profile Send private message
SoylentGreen
l33t
l33t


Joined: 19 Aug 2005
Posts: 904
Location: The Hostel

PostPosted: Thu Apr 13, 2006 4:58 pm    Post subject: Reply with quote

CHTEKK wrote:
The two bugs that mainly made -r1 necessary are the following:

https://bugs.gentoo.org/show_bug.cgi?id=128713 (the security issue)
https://bugs.gentoo.org/show_bug.cgi?id=126054

hmm... though.. no GLSA - why?
CHTEKK wrote:

Now, don't worry about the data you have in your databases, your databases are latin1

well, my database is what i told it do be.
however.. thx for clarifying! <where is the beer smiley> <g>

well, please inform us in this thread, if the php problem is fixed (charset). and - *please* - verify everything works smoothly with phpBB!
yes, i am aware phpBB is hardmasked in portage, though.. plenty of us are using it (apart from portage) and it is a PIA to see it break.

thanks for listening and for your effort!
keep up your good work <seriously meant!>
Back to top
View user's profile Send private message
napoleonb
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jan 2004
Posts: 141

PostPosted: Thu Apr 13, 2006 6:42 pm    Post subject: Reply with quote

In case anyone needs to fix phpBB to work with utf-8 without re-emerging mysql with the modified eclass:

  1. locate the file FORUM_LOCATION/language/lang_whatever/lang_main.php
  2. replace $lang['ENCODING']='ISO-8859-1' with $lang['ENCODING']='utf-8'
  3. convert the file to utf-8 encoding (iconv -f iso-8859-1 -t utf-8 lang_main.php > whatever; cp whatever lang_main.php

That worked for me (my.cnf encodings all set to utf8) even if all my data is in latin1.
Back to top
View user's profile Send private message
SoylentGreen
l33t
l33t


Joined: 19 Aug 2005
Posts: 904
Location: The Hostel

PostPosted: Thu Apr 13, 2006 7:36 pm    Post subject: Reply with quote

napoleonb wrote:
In case anyone needs to fix phpBB to work with utf-8 without re-emerging mysql with the modified eclass:

  1. locate the file FORUM_LOCATION/language/lang_whatever/lang_main.php
  2. replace $lang['ENCODING']='ISO-8859-1' with $lang['ENCODING']='utf-8'
  3. convert the file to utf-8 encoding (iconv -f iso-8859-1 -t utf-8 lang_main.php > whatever; cp whatever lang_main.php

That worked for me (my.cnf encodings all set to utf8) even if all my data is in latin1.

and you are able to login as admin?
Back to top
View user's profile Send private message
SoylentGreen
l33t
l33t


Joined: 19 Aug 2005
Posts: 904
Location: The Hostel

PostPosted: Thu Apr 13, 2006 8:07 pm    Post subject: Reply with quote

SoylentGreen wrote:
napoleonb wrote:
In case anyone needs to fix phpBB to work with utf-8 without re-emerging mysql with the modified eclass:

  1. locate the file FORUM_LOCATION/language/lang_whatever/lang_main.php
  2. replace $lang['ENCODING']='ISO-8859-1' with $lang['ENCODING']='utf-8'
  3. convert the file to utf-8 encoding (iconv -f iso-8859-1 -t utf-8 lang_main.php > whatever; cp whatever lang_main.php

That worked for me (my.cnf encodings all set to utf8) even if all my data is in latin1.

and you are able to login as admin?

after waiting half an hour - i suspect you are not :lol:
Back to top
View user's profile Send private message
EvilGenius
n00b
n00b


Joined: 27 Apr 2005
Posts: 18
Location: Stralsund / Germany

PostPosted: Thu Apr 13, 2006 8:19 pm    Post subject: Reply with quote

Well, I ran into the same problem.

Weird is, that phpMyAdmin shows all characters right, but my scripts don't.
But if I dump the tables with phpmyadmin, the characters are messed up to.

Dumping databases and importing them back as utf-8 didn't do it.

Any suggestions?
Back to top
View user's profile Send private message
SoylentGreen
l33t
l33t


Joined: 19 Aug 2005
Posts: 904
Location: The Hostel

PostPosted: Thu Apr 13, 2006 8:25 pm    Post subject: Reply with quote

EvilGenius wrote:

Any suggestions?


the *real* solution is going one step back.
mysql 4.1.14 (without -r1)
ebuild and my.cnf is listed on the previous page in this thread.

for the 1st time in my gentoo life they fscked it up real badly :twisted:

* well, even on an 2.8Ghz P4 it takes some time to compile..
Back to top
View user's profile Send private message
napoleonb
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jan 2004
Posts: 141

PostPosted: Thu Apr 13, 2006 8:34 pm    Post subject: Reply with quote

SoylentGreen wrote:
napoleonb wrote:
In case anyone needs to fix phpBB to work with utf-8 without re-emerging mysql with the modified eclass:

  1. locate the file FORUM_LOCATION/language/lang_whatever/lang_main.php
  2. replace $lang['ENCODING']='ISO-8859-1' with $lang['ENCODING']='utf-8'
  3. convert the file to utf-8 encoding (iconv -f iso-8859-1 -t utf-8 lang_main.php > whatever; cp whatever lang_main.php

That worked for me (my.cnf encodings all set to utf8) even if all my data is in latin1.

and you are able to login as admin?


You mean on the forum? Of course, I am (I needed to since I updated from 2.0.19 to 2.0.20 after "fixing" php-mysql).

EDIT: I also had to convert the other php files in lang_whatever (admin, faq, etc).


Last edited by napoleonb on Thu Apr 13, 2006 8:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page Previous  1, 2, 3, 4, 5  Next
Page 2 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum