Professional Web Applications Themes

my.cnf file not used by mysqld_safe in FreeBSD - MySQL

Hi, I have a server with FreeBSD 4.10 and mySQL 5.0 and I'm trying to use the my-small.cnf file as my my.cnf file. I have copied and renamed it to /usr/local/mysql/my.cnf which is where my BASEDIR referes to. I have added this to the [mysqld] and [mysqld_safe] sections open_files_limit = 512 I start mysqld at startup from the rc.local file: /bin/sh -c 'cd /usr/local/mysql; ./bin/mysqld_safe --defaults-file=/usr/local/mysql/my.cnf --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/ &' I also tried only: /bin/sh -c 'cd /usr/local/mysql; ./bin/mysqld_safe --user=mysql &' But if I look into mysql the open_files_limit stay a the default value, so it seems that the my.cnf ...

  1. #1

    Default my.cnf file not used by mysqld_safe in FreeBSD

    Hi,
    I have a server with FreeBSD 4.10 and mySQL 5.0 and
    I'm trying to use the my-small.cnf file as my my.cnf file.
    I have copied and renamed it to /usr/local/mysql/my.cnf which
    is where my BASEDIR referes to.

    I have added this to the [mysqld] and [mysqld_safe] sections
    open_files_limit = 512

    I start mysqld at startup from the rc.local file:
    /bin/sh -c 'cd /usr/local/mysql; ./bin/mysqld_safe
    --defaults-file=/usr/local/mysql/my.cnf --user=mysql
    --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/ &'
    I also tried only:
    /bin/sh -c 'cd /usr/local/mysql; ./bin/mysqld_safe --user=mysql &'

    But if I look into mysql the open_files_limit stay a the default value,
    so
    it seems that the my.cnf file is not readed.

    I tried moving the my.cnf file to these directories
    /usr/local/mysql/data/
    /usr/local/etc/
    /etc/
    without any results

    I also tried to change the owner and group of my.cnf to mysql

    If I have 2 copies of my.cnf in the /usr/local/mysql/ and
    /usr/local/mysql/data/ directories .. I get a message from
    mysqld at startup saying that it found 2 copies of my.cnf
    and will ignore the one in the /data/ directory. So it seems
    that mysqld is looking for the file and is looking at the right
    place. Very strange!

    If I use my_print_defaults mysql mysql_safe I get the correct
    values.

    Why mysqld is not using the open_files_limit value? So other
    configuration values do not match the values in my.cnf too.

    I spent many hours on this, and really don't know what else
    to try ... any help will be greatly appreciate

    Thanks in advance.

    none Guest

  2. #2

    Default Re: my.cnf file not used by mysqld_safe in FreeBSD

    Ok, it seems the file is read but not every options are taken into
    account (like the open_files_limit). I just tried to put my.cnf in
    the /etc/ directory and add this line to the file:
    skip-innodb

    When I rebooted mysql took 10Meg less RAM. It doesn't work if I
    put the file in the /usr/local/etc/ directory. I didn't test it in
    /usr/local/mysql and /usr/local/mysql/data/.

    I still don't understant why some options do not change anything,
    many of them like:
    sort_buffer_size
    net_buffer_length
    table_cache
    key_buffer_size
    thread_stack
    open_files_limit

    By the way anyone know if innoDB is really usefull for a small
    mySQL database? I would really like to free 10 megs from memory

    Thanks

    none Guest

Similar Threads

  1. FMS on FreeBSD!
    By little-devil in forum Macromedia Flash Flashcom
    Replies: 0
    Last Post: September 19th, 04:29 PM
  2. Stopping Mysql started with mysqld_safe
    By salvador in forum MySQL
    Replies: 1
    Last Post: August 2nd, 07:49 PM
  3. DBD::RAM on FreeBSD
    By Jan Pips in forum PERL Modules
    Replies: 2
    Last Post: June 14th, 12:04 AM
  4. Compile FreeBSD RELENG_5 on FreeBSD 4-STABLE
    By Brovo Karokin in forum FreeBSD
    Replies: 1
    Last Post: February 25th, 09:04 AM
  5. Instead of freebsd.com, why not...
    By Joshua Tinnin in forum FreeBSD
    Replies: 3
    Last Post: February 21st, 06:20 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139