The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Seting up mysql default charset

Discussion in 'General Discussion' started by mydomain, May 10, 2004.

  1. mydomain

    mydomain Well-Known Member

    Joined:
    Aug 10, 2003
    Messages:
    138
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  2. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    765
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    N.W. Iowa
    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
     
  3. mydomain

    mydomain Well-Known Member

    Joined:
    Aug 10, 2003
    Messages:
    138
    Likes Received:
    0
    Trophy Points:
    16
    That will be a global change? How will that impace mysql functions for all other users?
     
  4. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    765
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    N.W. Iowa
    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
     
  5. Devil Inside

    Devil Inside Well-Known Member

    Joined:
    Apr 4, 2003
    Messages:
    277
    Likes Received:
    0
    Trophy Points:
    16
    How would I make the change to latin5 for one user's account?
     
  6. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
  7. Devil Inside

    Devil Inside Well-Known Member

    Joined:
    Apr 4, 2003
    Messages:
    277
    Likes Received:
    0
    Trophy Points:
    16
    Great - thanks haze :)
     
  8. myweb

    myweb Well-Known Member

    Joined:
    Jun 18, 2002
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Tokyo
    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?
     
Loading...

Share This Page