I have two mysql instance in my docker yml. One is working fine while another is creating error. This is my docker compose yml file version: '2' services: my-admin-db.com: image: mysql:5.7 volumes_from: - my-admin-db-data.com ports: - "3307:3306" environment: TZ: "US/Eastern" JAVA_OPTS: -Xms128m MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: root restart: always mem_limit: 512m my-admin-db-data.com: image: busybox volumes: - ~/docker/mysql/my_admin:/var/lib/mysqlThis is my docker compose yml file.
version: '2' services: my-admin-db.com: image: mysql:5.7 volumes_from: - my-admin-db-data.com ports: - "3307:3306" environment: TZ: "US/Eastern" JAVA_OPTS: -Xms128m MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: root restart: always mem_limit: 512m my-admin-db-data.com: image: busybox volumes: - ~/docker/mysql/my_admin:/var/lib/mysql my-db.com: image: mysql:5.7 volumes_from: - my-db-data.com environment: TZ: "US/Eastern" JAVA_OPTS: -Xms128m MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: root ports: - "3352:3306" restart: always mem_limit: 512m my-db-data.com: image: busybox volumes: - ~/docker/mysql/my_db:/var/lib/mysql
I have two mysql instance in my-db docker yml.com: image: mysql:5 One is working fine while another is creating error.7 volumes_from: - my-db-data I have also tried to change the mysql port and removing the existing container but still it is giving me same error.com environment: TZ: "US/Eastern" JAVA_OPTS: -Xms128m MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: root ports: - "3352:3306" restart: always
It looks like the error coming from here mem_limit: 512mFatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist my-admin-db.com_1 | 2020-09-08T06:05:23.737819Z 0 [ERROR] Fatal error: Failed to initialize ACL/grant/time zones structures or failed to remove temporary table files. my-db-dataBut i am not able to figure it out.com: image: busybox volumes: - ~/docker/mysql/my_db:/var/lib/mysqlAny help would be appreciated