Unable to login to MariaDB, "Acess Denied"

    • OMV 4.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Unable to login to MariaDB, "Acess Denied"

      I'm following TechnoDadLife's Nextcloud tutorial in docker, but I keep running into the same problem. You can go to the time 6:31 in the video, where I am stuck. I am trying to login to my Nextclouddb that I created with MariaDB, but the result is as followed:

      root@ASUS:~# docker restart Nextclouddb
      Nextclouddb
      root@ASUS:~# docker exec -it Nextclouddb bash
      root@1b5091589fe6:/# mysql -uroot -p
      Warning: World-writable config file '/etc/mysql/conf.d/custom.cnf' is ignored
      Enter password:
      ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)


      I deleted all the files, deleted the containers and started from scratch with the same problem. I even killed the instance, set the varriable MYSQL_ROOT_PASSWORD again and restarted the container with no luck. ;( Help please!
    • GuyFromMars wrote:

      acecombat2 wrote:

      I think you get help faster from technodad's youtube comment section. they already have the solution.
      Can you let me know the solution. I combed through all the comments & saw others with the problem, but no solution.

      I don't follow technodad life's tutorial 100%, I had some issue with editing on nextcloud config and custom cnf.

      I use original developer docker images and phpmyadmin to administer mariadb database via webui. and I assume you already able to use shellinabox, create 'user-defined' bridge network,know how to mount volume docker.



      #First Download/pull
      hub.docker.com/_/mariadb

      hub.docker.com/r/phpmyadmin/phpmyadmin


      #Second run the following command with your desire bridge name via shellinabox plugin page.

      docker network create -d bridge my-nextcloud-network #edit the 'my-nextcloud-network'


      #third in docker plugin page

      1.Then Run Image of mariadb with the following setting:

      a. Easy to type container name like 'maria-db'

      b. under Restart policy choose unless-stopped
      c. under Networking choose 'Bridge' Network Mode.

      d. under Environment Variables add the following variable 'MYSQL_ROOT_PASSWORD' with the value of your own password 'mypasswd' #use easy to remember password better.

      e. Under Volume and bind mounts choose your host path (after you have created the folder that is) and the Container path is /var/lib/mysql

      f. under Extra Argument type in '--network my-nextcloud-network' #refer to #second para

      Then save the setting. to run the container.

      #Fourth
      2. Run Image of phpmyadmin/phpmyadmin with the following setting:
      a. Container name 'phpmyadmin'
      b. same as 1.b
      c. same as 1.c and add port forward with the following value
      Host IP = 0.0.0.0, Host port = 82, Exposed port=80/tcp then press ADD (+).
      d. under Environment Variables add the following variable 'PMA_HOST' with the value of 'maria-db' container name.
      e. under Extra Argument type in --'network my-nextcloud-network' #refer to #second para
      Then save the setting. to run the container.

      #Fifth
      1.open your webbrowser and point to your server ip and port 82 = 192.168.xxx.xxx:82 to access phpmyadmin webpage.
      2.Login ID: root, Password: refer to 1.d
      3.Create your 'nextclouddb' database.
      4.Create a user with Global Privilege.


      Done

      I hate command lines to administer database. that is why I recommend phpmyadmin.
      The rest you may follow technodad life's tutorial. I recommend using caddy docker image by abiosoft instead letsencrypt docker image used by technodad life's. Google caddy webserver. if you need my caddy config example. do tell me.

      When you succeed reached at nextcloud's installation webpage, in database host just type 'maria-db' for database username and password refer to #fifth paragraph. However, make sure the nextcloud docker has the same extra argument as 1.f and 2.e.
      Images
      • NC.png

        141.16 kB, 1,365×652, viewed 41 times
      :thumbsup: OMV made my day! Openvpn,SSH Webui and Docker Webui, Where I'm looking for so long.

      The post was edited 7 times, last by acecombat2: changes in extra argument ().

    • I haven't watched the video but newer versions of mysql and mariadb don't use a password when you are logged in as root. So, you should just try mysql instead of mysql -u root -p
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • @acecombat2 I may try that soon, but somehow I managed to get everything to work. I think it was some permissions issue, although MariaDB still complains about "World Writable." My next problem is when I try to use nextcloud with the DB setup, I eventually get a "504 gateway time-out " when trying to setup eveything for the first time on nextcloud. I know Technodad had us uncomment binding the addresss to 0.0.0.0 in the custom.cnf for MariaDb, so maybe MariaDB isn't communicating, thus causing a delay? I'm still new to linux, trying to understand.:/
    • GuyFromMars wrote:

      @acecombat2 I may try that soon, but somehow I managed to get everything to work. I think it was some permissions issue, although MariaDB still complains about "World Writable." My next problem is when I try to use nextcloud with the DB setup, I eventually get a "504 gateway time-out " when trying to setup eveything for the first time on nextcloud. I know Technodad had us uncomment binding the addresss to 0.0.0.0 in the custom.cnf for MariaDb, so maybe MariaDB isn't communicating, thus causing a delay? I'm still new to linux, trying to understand.:/
      like I said, on the first line. I don't touch custom.cnf file due to nature it changes(corrupt) the original permission when you saved the file under windows os. I remember something along the line that you need to change the ownership chmod from root to www-data (within docker container). I forgot how I did it. to nextcloud files and folder. I never had the world writable issue and I don't have solution for it since it never occur to me.
      :thumbsup: OMV made my day! Openvpn,SSH Webui and Docker Webui, Where I'm looking for so long.

      The post was edited 2 times, last by acecombat2 ().

    • ryecoaaron wrote:

      I haven't watched the video but newer versions of mysql and mariadb don't use a password when you are logged in as root. So, you should just try mysql instead of mysql -u root -p
      technodad life's tutorial using linuxserver/mariadb docker image. I have yet to understand the puid and guid part of what is the role and issue without it. the original author of nextcloud and mariadb docker image does not state to define those variables for their docker image.
      :thumbsup: OMV made my day! Openvpn,SSH Webui and Docker Webui, Where I'm looking for so long.
    • Because, as a beginner, I want to follow tutorials, until I understand the software myself. Technodad happens to be very active here on OMV with extensive tutorials. Unfortunately, I have run into a number of hiccups. ...Since I dual-boot, I was hoping to preserve my NTFS data partition on the occasion I want to fire up Windows 10, while otherwise using it on Linux for my NAS data storage. Looks to me that permissions are the main problem. :(