[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql
Subject:    Re: Recompiling to avoid issuing SET NAMES
From:       "Rob Wultsch" <wultsch () gmail ! com>
Date:       2008-09-29 21:27:51
Message-ID: 2c5ef4e30809291427nd8ca357t98718065bdad630a () mail ! gmail ! com
[Download RAW message or body]

In your ini/cnf play around with the "default-character-set" variables.

[mysql]
# default-character-set=latin1
default-character-set=utf

C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.51b-community-nt MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show variables like 'character_set_connection';
+--------------------------+-------+
| Variable_name            | Value |
+--------------------------+-------+
| character_set_connection | utf8  |
+--------------------------+-------+
1 row in set (0.00 sec)

mysql> exit
Bye

//changed the ini...

C:\Program Files\MySQL\MySQL Server 5.0\bin>net stop mysql
The MySQL service is stopping.
The MySQL service was stopped successfully.


C:\Program Files\MySQL\MySQL Server 5.0\bin>net start mysql
The MySQL service is starting.
The MySQL service was started successfully.


C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.51b-community-nt MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show variables like 'character_set_connection';
+--------------------------+--------+
| Variable_name            | Value  |
+--------------------------+--------+
| character_set_connection | latin1 |
+--------------------------+--------+
1 row in set (0.00 sec)



On Sun, Sep 28, 2008 at 9:11 AM, Luigi Perroti
<luigi.perroti@googlemail.com> wrote:
> Hi, I'm currently using the official MySQL binaries and I have to
> issue 'SET NAMES utf8' queries on every connection to override the
> default values for character_set_connection and collation_connection.
>
> I was wondering how to avoid the overhead that issuing these queries
> introduces. After some searching it appears that my only option would
> be to recompile the server with the desired defaults.
> Is this correct or is there another way to achieve the same effect?
>
> Thanks for your time!
>
> Regards,
> Luigi
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=wultsch@gmail.com
>
>



-- 
Rob Wultsch
wultsch@gmail.com
wultsch (aim)

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=mysql-marcsub@progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic