title: docker mysql permission denied
body: <p>I'm using the Centos7 system, I have a /docker folder that is shared on the network (temporarily to transfer data) I'm trying to run mysql pointing /docker/mysql as a folder to persist data but I'm having an error that I didn't understand how to solve it</p>
  <pre><code>[root@localhost docker]# sudo docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=mysql -e MYSQL_USER=user -e MYSQL_PASSWORD=userpass -v /docker/mysql:/var/lib/mysql mysql
  2022-08-31 19:15:11+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
  find: '/var/lib/mysql/': Permission denied
  find: '/var/lib/mysql': Permission denied
  chown: changing ownership of '/var/lib/mysql/': Permission denied
  chown: changing ownership of '/var/lib/mysql': Permission denied
  </code></pre>
  <p>could someone help me please?</p>