# mysql: unable to start vi /etc/init.d/mysql

## Henry78

Hello!

This issue confuses my quite a bit: If i try to start mysql via the init-script it fails and the following text ist logged to mysqld.err:

 *Quote:*   

> 
> 
> 070919 19:11:21 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=/var/run/mysqld/mysqld-bin' to avoid this problem.
> 
> 070919 19:11:22  InnoDB: Started; log sequence number 0 60391
> ...

 

I checked port 3306, it's unused and no mysql process is running...? If i just type 

```
mysqld
```

 from commandline, everything works fine, i.e. mysql starts.

My mysql-installation is about two years old, and i didn't change my my.cnf, if anybody want to take a look at it, I'll post.

Thanks in advance for any help, it's very appreciated.

-- 

regards, Henry

----------

## kashani

You didn't happen to set an IP address manually in your my.cnf did you?

Posting your my.cnf is probably a good idea and the version of mysql you're running.

kashani

----------

## Henry78

I'm running mysql-5.0 and yes, i set an IP in my.cnf, but my.cnf should be read in both cases! btw: no other my.cnf (/etc/my.cnf ~/.my.cnf) exists

(/etc/mysql/my.cnf, comments stripped):

```

[client]

port                                            = 3306

socket                                          = /var/run/mysqld/mysqld.sock

[mysql]

character-sets-dir=/usr/share/mysql/charsets

default-character-set=utf8

[mysqladmin]

character-sets-dir=/usr/share/mysql/charsets

default-character-set=utf8

[mysqlcheck]

character-sets-dir=/usr/share/mysql/charsets

default-character-set=utf8

[mysqldump]

character-sets-dir=/usr/share/mysql/charsets

default-character-set=utf8

[mysqlimport]

character-sets-dir=/usr/share/mysql/charsets

default-character-set=utf8

[mysqlshow]

character-sets-dir=/usr/share/mysql/charsets

default-character-set=utf8

[myisamchk]

character-sets-dir=/usr/share/mysql/charsets

[myisampack]

character-sets-dir=/usr/share/mysql/charsets

[mysqld_safe]

err-log                                         = /var/log/mysql/mysql.err

[mysqld]

character-set-server            = utf8

default-character-set           = utf8

user                            = mysql

port                            = 3306

socket                          = /var/run/mysqld/mysqld.sock

pid-file                        = /var/run/mysqld/mysqld.pid

log-error                       = /var/log/mysql/mysqld.err

basedir                         = /usr

datadir                         = /var/lib/mysql

skip-locking

key_buffer                      = 16M

max_allowed_packet              = 1M

table_cache                     = 64

sort_buffer_size                = 512K

net_buffer_length               = 8K

read_buffer_size                = 256K

read_rnd_buffer_size            = 512K

myisam_sort_buffer_size         = 8M

language                        = /usr/share/mysql/english

expire_logs_days                = 31

bind-address                    = 192.168.1.100

server-id                       = 1

tmpdir                          = /tmp/

innodb_buffer_pool_size = 16M

innodb_additional_mem_pool_size = 2M

innodb_data_file_path = ibdata1:10M:autoextend:max:128M

innodb_log_file_size = 5M

innodb_log_buffer_size = 8M

set-variable = innodb_log_files_in_group=2

innodb_flush_log_at_trx_commit = 1

innodb_lock_wait_timeout = 50

[mysqldump]

quick

max_allowed_packet                      = 16M

[mysql]

[isamchk]

key_buffer                                      = 20M

sort_buffer_size                        = 20M

read_buffer                             = 2M

write_buffer                            = 2M

[myisamchk]

key_buffer                                      = 20M

sort_buffer_size                        = 20M

read_buffer                             = 2M

write_buffer                            = 2M

[mysqlhotcopy]

interactive-timeout

```

----------

## kashani

IIRC Mysql will usually use /etc/my.cnf as a default unless told otherwise. Since Gentoo uses /etc/mysql/my.cnf it's possible that starting it without the init script does not use the my.cnf. 

I'd recommend removing the bind address line altogether. You can also make sure it matches your actual IP address. 

kashani

----------

## Henry78

I need the bind, but i checked twice and it matches my actual ip-adress. I'll try to start mysql and set the cnf explicitly. I'll report back.

[edit] I need the bind, and it worked well for moth (years?)[/edit]Last edited by Henry78 on Wed Sep 19, 2007 8:46 pm; edited 1 time in total

----------

## Henry78

Couldn't find an option to set the cnf from commandline, but copied the /etc/mysql/my.cnf to /etc/my.cnf -> Same Problem.

----------

## kashani

What happens when you remove the bind statement?

kashani

----------

## Henry78

if i start it via the init-script nothing happens, not even the mysqld.err is written.

same happens if i use the bind. something is defenitly wrong now...?

But, if i start from commandline, the mysqld.err shows that the bind is succesful. so 1. the my.cnf from /etc/mysql is used and 2. the bind is ok and works. I'll reboot and test everything again tomorrow, can't believe that the mysqld.err isn't written anymore.

For now, thanks for the help, I should go to bed.

----------

