![]() ![]() Then navigate to localhost:8080 in your browser and login with username "root" and password "mypass" (leave server field blank). # PHP MY ADMIN #Īdd the following line to the "/etc/hosts" file: 127.0.0.1 localhostĪssuming you're also using nginx, and that config is elsewhere in your "docker-compose.yml", you can build and start these services with: docker-compose up -d mysql nginx db phpmyadmin MYSQL_ENTRYPOINT_INITDB=./mysql/docker-entrypoint-initdb.d MYSQL_ROOT_PASSWORD=$Įdit the ".env" file as follows: # MYSQL # Inside "docker-compose.yml" file, under "services": # db # For anyone else having this issue, here is a config that works for mysql and phpmyadmin. The error was not present using docker run.įor docker-compose.yml (version 3), one cause is services running on different networks by default. Out of the box, default config throws this error when you attempt to log into phpMyAdmin (using current images as of Oct 2018). I've had the same error installing docker using laradock, then running docker-compose up. Hint: if docker-compose is not installed on your machine, install it using this official docs (out of scope) TO rootlocalhost IDENTIFIED BY password También puedes comprobar los privilegios de usuario utilizando phpMyAdmin. A continuación, introduce este comando para conceder todos los privilegios: GRANT ALL PRIVILEGES ON. That's much simpler - docker run overcomplicates things and is not practical for those things - never. Tras conectarte correctamente, añade el siguiente comando desde el prompt de MySQL: mysql -uroot -p. So to connect our nextcloud container to it, we type: docker network connect databases nextcloud you can read up a lot more on docker networking in the official docker documentation here. All the links are setup for you automatically. If you used the above docker-compose file, your mysql container should already be connected to the databases network. Then start it using docker-compose up in the same folder your docker-compose.yml file is located.Īccess PHPmyadmin using the browser and use 'db' as the hostname of your database, since that is the name of the service in the docker-compose.yml file and therefore can be resolved using dockers internal DNS service to the actual ip of the docker-container. MYSQLHOST: The service name we set in the docker-compose. MYSQLDATABASE: Sets the name of the Nextcloud database. MYSQLPASSWORD: Sets a password for the user who will interact with the Nextcloud database. # just if you also want to access it directly from you host MYSQLUSER: Sets a name for the user who will interact with the Nextcloud database. Instead of starting them one by one, use docker-compose.Ĭreate a docker-compose.yml file version: '2' ![]()
0 Comments
Leave a Reply. |