Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Aug 2003
    Posts
    142

    Default Seting up mysql default charset

    Hi, we need to set up cp1251 as default charset for one user's mySQL database, does anyone know if that is possible and how we can do that?

    TIA
    Mike

  2. #2
    Member mickalo's Avatar
    Join Date
    Apr 2002
    Location
    N.W. Iowa
    Posts
    753

    Default Re: Seting up mysql default charset

    Originally posted by mydomain
    Hi, we need to set up cp1251 as default charset for one user's mySQL database, does anyone know if that is possible and how we can do that?

    TIA
    You'll need to change the default character set which is normally latin1 by setting the variable:
    character_set in your my.cnf main option file to the value you need. I believe this would be under the mysqld group settings, but you may want to double check that. Check out MySQL Docs for more info

    Mickalo

    Thunder Rain Internet Publishing

    Providing Internet Solutions that work!
    Custom Perl and Database Programming

  3. #3
    Member
    Join Date
    Aug 2003
    Posts
    142

    Default

    That will be a global change? How will that impace mysql functions for all other users?
    Mike

  4. #4
    Member mickalo's Avatar
    Join Date
    Apr 2002
    Location
    N.W. Iowa
    Posts
    753

    Default

    Originally posted by mydomain
    That will be a global change? How will that impace mysql functions for all other users?
    Yes, that would be a global change. I don't think it can be changed on an individual user basices prior to Version 4.1, but you maybe able to utilize the SET option during the client's active session, but you'd find a bit more indepth info on that from the MySQL docs. Or compile a separate MySQL server/client to use this other character set for this user if it's real critical. Setting up multiple MySQL isn't really difficult to do, even with Cpanels... done it a few times before.

    Mickalo

    Thunder Rain Internet Publishing

    Providing Internet Solutions that work!
    Custom Perl and Database Programming

  5. #5
    Member
    Join Date
    Apr 2003
    Posts
    277

    Default

    How would I make the change to latin5 for one user's account?

  6. #6
    Member
    Join Date
    Dec 2001
    Posts
    1,558

    Default

    You will need to drop the appropriate configuration into a my.cnf file within the users account. For more information, see the mysql docs as this step varries depending on which version of mySQL you run:

    http://dev.mysql.com/doc/mysql/en/se...variables.html
    Beau Henderson

  7. #7
    Member
    Join Date
    Apr 2003
    Posts
    277

    Default

    Great - thanks haze

  8. #8
    Member
    Join Date
    Jun 2002
    Location
    Tokyo
    Posts
    71

    Default

    Quote Originally Posted by haze
    You will need to drop the appropriate configuration into a my.cnf file within the users account. For more information, see the mysql docs as this step varries depending on which version of mySQL you run:

    http://dev.mysql.com/doc/mysql/en/se...variables.html
    I have created .my.cnf file and put it under the home directory of a specific user, but the character set value still remains as the global value (which is ujis).

    [mysql]
    default-character-set=sjis
    [mysqld]
    default-character-set=sjis
    [client]
    default-character-set=sjis

    Am I doiing something wrong, or is it that Cpanel does not allow the use of a user defined .my.cnf configuration file?

Similar Threads & Tags
Similar threads

  1. default MySQL collation and character set / charset
    By tgavin in forum Database Discussions
    Replies: 17
    Last Post: 02-01-2012, 04:51 PM
  2. default MySQL collation and character set / charset
    By tgavin in forum cPanel and WHM Discussions
    Replies: 12
    Last Post: 08-26-2010, 05:32 PM
  3. mysql default charset
    By section31 in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 08-26-2010, 04:42 PM
  4. default charset
    By lukaschemp in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 12-27-2007, 08:19 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube