0

I have Master on 5.6 & Slave on 5.5, this will be the test ENV to check if 5.6 can replicate on 5.5 on PROD.

I am getting this below error when starting mysql

ERROR! MySQL server PID file could not be found!  
Starting MySQL.. ERROR! The server quit without updating PID file (/var/lib/mysql/test.lester.com.pid).

For reference, here are the contents of /etc/my.cnf :

# The following options will be passed to all MySQL clients
[client]

port            = 3306  
socket=/var/lib/mysql/mysql.sock  

# The MySQL server  
[mysqld]
port            = 3306
socket=/var/lib/mysql/mysql.sock
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 1M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M

bind-address    = 0.0.0.0
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8

log-bin=mysql-bin

# binary logging format - mixed recommended
binlog_format=mixed
server-id       = 2

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

I tried many options for resolving this error... but unfortunately no luck, Please help.

wurtel
  • 3,864
  • 12
  • 15
AReddy
  • 101
  • 4
  • Replication from 5.6 to 5.5 is not fully supported but it is possible by changing log bin use v1, bin log row format, bin log checksum accordingly. – jerichorivera Oct 25 '15 at 13:15

3 Answers3

1

This is not related to replication, although you probably mangled the config when adding the lines relating to replication. In particular you're missing a pid-file line, try adding this to the [mysqld] section:

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

This line is currently the the [mysqld_safe] section, I don't think it belongs there.

wurtel
  • 3,864
  • 12
  • 15
0

Run the following and make sure that the pid-file in the configuration matches up with the pid-file definition under [mysqld] in your mysql cnf file, there's most likely a miss-match in the init.d script and your configuration.

mysqld --print-defaults | grep pid-file

user2108948
  • 111
  • 7
0

Read the above posts about the pid file, I just wanted to add that sometimes you need to create it. You should also use ps to double check that mysql isn't already running.

If mysql is running, add the pid of mysql_safe (I think) to your pid file.

Some Linux Nerd
  • 3,327
  • 3
  • 19
  • 22
  • BTW replication between 5.6 and 5.5 should be fine, though you should leave out mysql.* and other system directories since extra stuff was added to mysql.users between 5.5 and 5.6. – Some Linux Nerd Oct 21 '15 at 22:30