Results 1 to 3 of 3

Thread: mysql ignoring my.cnf

  1. #1
    Join Date
    Oct 2008
    Location
    Canada
    Beans
    20
    Distro
    Ubuntu 9.10 Karmic Koala

    mysql ignoring my.cnf

    I need to make some changes to my mysql server configurations. However, any modifications I make to the file /etc/mysql/my.cnf seem to be ignored by the service when it starts.

    Code:
    evan@annie:/etc/mysql$ lsb_release -a
    No LSB modules are available.
    Distributor ID:	Ubuntu
    Description:	Ubuntu 9.10
    Release:	9.10
    Codename:	karmic
    Code:
    evan@annie:/etc/mysql$ strace mysql 2>&1 | grep cnf
    stat("/etc/my.cnf", 0x7fff12afad90)     = -1 ENOENT (No such file or directory)
    stat("/etc/mysql/my.cnf", {st_mode=S_IFREG|0644, st_size=3658, ...}) = 0
    open("/etc/mysql/my.cnf", O_RDONLY)     = 3
    stat("/etc/mysql/conf.d/mysqld_safe_syslog.cnf", {st_mode=S_IFREG|0644, st_size=21, ...}) = 0
    open("/etc/mysql/conf.d/mysqld_safe_syslog.cnf", O_RDONLY) = 4
    stat("/usr/etc/my.cnf", 0x7fff12afad90) = -1 ENOENT (No such file or directory)
    stat("/home/evan/.my.cnf", 0x7fff12afad90) = -1 ENOENT (No such file or directory)
    Code:
    evan@annie:/etc/mysql$ cat my.cnf | grep lower
    lower_case_table_names=1
    Code:
    evan@annie:/etc/mysql$ mysql -uroot -p
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 71
    Server version: 5.1.37-1ubuntu5.1 (Ubuntu)
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql> show variables like 'lower%';
    +------------------------+-------+
    | Variable_name          | Value |
    +------------------------+-------+
    | lower_case_file_system | OFF   | 
    | lower_case_table_names | 0     | 
    +------------------------+-------+
    2 rows in set (0.00 sec)
    Any ideas?

    Thanks,
    Evan

  2. #2
    Join Date
    Jan 2010
    Location
    Australia
    Beans
    544
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: mysql ignoring my.cnf

    I just added that option to my /etc/mysql/my.cnf and it's showing up OK, but I'm using Lucid at the moment. The only things I can think of are that you might not be not adding it to the right section (under [mysqld]) or one of the other files in conf.d/ is changing the variable back.

    EDIT: Just SSHed to my Karmic PC and tried it. Works fine.

  3. #3
    Join Date
    Oct 2008
    Location
    Canada
    Beans
    20
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: mysql ignoring my.cnf

    Thanks muchly! The hours I spent because I'd put it at the bottom of the file ((


    Edit: although i was changing other values like port to see if changes were being applied but that wasn't getting picked up either. Oh well, lower_case is working now and my deadline is too close for me to care about much else.
    Last edited by phen0m; March 11th, 2010 at 05:17 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •