Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.4K
Views
mysql docker container no se inicia, mysqld: no se puede crear/escribir en el archivo '/var/lib/mysql/is_writable' (OS errno 13 - Permiso denegado)

Creé un archivo de composición de ventana acoplable para ejecutar el contenedor acoplable mysql y usar los scripts de la base de datos para inicializar la base de datos.

Al iniciar el contenedor, recibo el siguiente error.

 account-service-db_1 | Initializing database account-service-db_1 | mysqld: Can't create/write to file '/var/lib/mysql/is_writable' (OS errno 13 - Permission denied) account-service-db_1 | 2019-05-11T16:58:35.265463Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release. account-service-db_1 | 2019-05-11T16:58:35.265550Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.16) initializing of server in progress as process 15 account-service-db_1 | 2019-05-11T16:58:35.268464Z 0 [ERROR] [MY-010460] [Server] --initialize specified but the data directory exists and is not writable. Aborting. account-service-db_1 | 2019-05-11T16:58:35.268472Z 0 [ERROR] [MY-013236] [Server] Newly created data directory /var/lib/mysql/ is unusable. You can safely remove it. account-service-db_1 | 2019-05-11T16:58:35.269284Z 0 [ERROR] [MY-010119] [Server] Aborting account-service-db_1 | 2019-05-11T16:58:35.270510Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.16) MySQL Community Server - GPL. docker-swarm-account-service-mysql-demo_account-service-db_1 exited with code 1

Después de investigar, muchas personas sugirieron agregar el usuario: "1000:50" en el archivo de composición resolverá el problema. Pero después de agregar también recibo el mismo error.

busque el archivo my docker-compose a continuación

 version: '3.7' services: account-service-db: user: "1000:50" image: mysql environment: - MYSQL_DATABASE=account-service - MYSQL_USER=mysqluser - MYSQL_PASSWORD=mysqlpassword - MYSQL_ROOT_PASSWORD=mysqlpassword volumes: - "/Users/admin/dockerfiles/docker-swarm-account-service-mysql-demo/scripts/:/docker-entrypoint-initdb.d/" - "/Users/admin/dockerfiles/docker-swarm-account-service-mysql-demo/account:/var/lib/mysql" ports: - "3306:3306" deploy: replicas: 1 placement: constraints: - node.labels.mysql.node == true restart_policy: condition: on-failure delay: 10s #max-attempts: 3

Estoy ejecutando el escenario anterior en una máquina mac. Por favor, ayúdenme por qué se comporta así después de otorgar todos los permisos necesarios para el volumen y la carpeta de scripts.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

El problema parece estar en la carpeta de su account . Es posible que ya esté en uso o dañado. Crea una nueva carpeta y prueba.

Elimine las comillas dobles de los valores ambientales en el archivo de redacción.

Si la carpeta en el host que se está montando no tiene los permisos de escritura necesarios:

  1. ssh a su host/nodo
  2. chmod -R a+rwx /path/to/account/folder
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!