Mysql container setup for rancher

Anyone plz share working docker-compose file rancher with mysql and appropriate mysql settings. I getting this error https://gist.github.com/ndelitski/68a4e9111e882ed4b009

rancher-server:
  image: rancher/server:v0.47.0
  ports:
  - 80:8080
  links:
  - mysql:mysql
  environment:
    CATTLE_DB_CATTLE_MYSQL_HOST: mysql
    CATTLE_DB_CATTLE_MYSQL_PORT: 3306
    CATTLE_DB_CATTLE_MYSQL_NAME: cattle
    CATTLE_DB_CATTLE_USERNAME: cattle_user
    CATTLE_DB_CATTLE_PASSWORD: 366951
  volumes:
  - /data/rancher-secondary/cattle:/var/lib/cattle
  # - /data/rancher-secondary/mysql/rancher-log:/var/log/mysql
  tty: true
  stdin_open: true
  restart: always
mysql:
  image: mysql:5.6
  environment:
    MYSQL_ROOT_PASSWORD: 111222
    MYSQL_DATABASE: cattle
    MYSQL_USER: cattle_user
    MYSQL_PASSWORD: 366951
  volumes:
  - ~/conf.d:/etc/mysql/conf.d
  - /data/rancher-secondary/mysql:/var/lib/mysql
  tty: true
  stdin_open: true
  restart: always

conf.d/rancher.cnf

[mysql]
prompt = '\\u@\\h [\\d] > '

[mysqld]

## innodb
#innodb_strict_mode
innodb_buffer_pool_size = 1G
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_buffer_size = 16M
innodb_log_file_size = 512M
innodb_doublewrite = 0
innodb_read_io_threads = 8
innodb_write_io_threads = 8
innodb_lock_wait_timeout = 5
innodb_support_xa = 1
innodb_autoinc_lock_mode = 2
innodb_flush_log_at_trx_commit = 1
innodb_flush_method = O_DIRECT
innodb_file_per_table
innodb_file_format = Barracuda
innodb_print_all_deadlocks
innodb_large_prefix = 1

## innodb for ssd
innodb_flush_neighbors = 0
innodb_random_read_ahead = 0
innodb_read_ahead_threshold = 0
innodb_io_capacity = 2000
innodb_io_capacity_max = 2000
innodb_lru_scan_depth = 2000