How to set charset and collation in MySQL database under Apache 2?

How to set charset and collation in MySQL database under Apache 2?

am 02.07.2007 16:54:52 von Frodo

Hello,

I'm new here.

My future "carriere" depends on question in topic.
I've just install Fedora 7 with Apache 2.xx MySQL 5.1 and PHP 5.xx server.
Installation were fast and simple but......
Database MySQL characterset is UTF-8 ( unicode ) it is not acceptable by my
intranet suite vendor.
In my country ( Poland ) de-facto and only standard is ISO-8859-2 national
character coding also known as latin2.

I really dont know how an where reconfigure my MySQL.
After non sleeped weekend I've no idea what to do.
My boss is angry and could fire me.

Please help if You can.

Thanks in advance.

M. A. Pawlak - Poland

Re: How to set charset and collation in MySQL database under Apache 2?

am 02.07.2007 22:40:59 von petersprc

You could try this in your my.cnf [mysqld] section:

language=/usr/share/mysql/polish
character-sets-dir=/usr/share/mysql/charsets
default-character-set=latin2
init_connect='SET character_set_results=latin2;'

On Jul 2, 10:54 am, "frodo" wrote:
> Hello,
>
> I'm new here.
>
> My future "carriere" depends on question in topic.
> I've just install Fedora 7 with Apache 2.xx MySQL 5.1 and PHP 5.xx server.
> Installation were fast and simple but......
> Database MySQL characterset is UTF-8 ( unicode ) it is not acceptable by my
> intranet suite vendor.
> In my country ( Poland ) de-facto and only standard is ISO-8859-2 national
> character coding also known as latin2.
>
> I really dont know how an where reconfigure my MySQL.
> After non sleeped weekend I've no idea what to do.
> My boss is angry and could fire me.
>
> Please help if You can.
>
> Thanks in advance.
>
> M. A. Pawlak - Poland

Re: How to set charset and collation in MySQL database under Apache 2?

am 02.07.2007 22:44:46 von petersprc

character_set_server and collation_server are 2 more options. More
info:

http://dev.mysql.com/doc/refman/5.0/en/charset-syntax.html

On Jul 2, 4:40 pm, petersprc wrote:
> You could try this in your my.cnf [mysqld] section:
>
> language=/usr/share/mysql/polish
> character-sets-dir=/usr/share/mysql/charsets
> default-character-set=latin2
> init_connect='SET character_set_results=latin2;'
>
> On Jul 2, 10:54 am, "frodo" wrote:
>
> > Hello,
>
> > I'm new here.
>
> > My future "carriere" depends on question in topic.
> > I've just install Fedora 7 with Apache 2.xx MySQL 5.1 and PHP 5.xx server.
> > Installation were fast and simple but......
> > Database MySQL characterset is UTF-8 ( unicode ) it is not acceptable by my
> > intranet suite vendor.
> > In my country ( Poland ) de-facto and only standard is ISO-8859-2 national
> > character coding also known as latin2.
>
> > I really dont know how an where reconfigure my MySQL.
> > After non sleeped weekend I've no idea what to do.
> > My boss is angry and could fire me.
>
> > Please help if You can.
>
> > Thanks in advance.
>
> > M. A. Pawlak - Poland