dokku / dokku-mariadb

a mariadb plugin for dokku
MIT License
75 stars 26 forks source link

Diagnosing database status #47

Closed Epigene closed 8 years ago

Epigene commented 8 years ago

What I am trying to do

Set up a vanilla Wordpress 4.5 blog with MariaDB

What is not working

Error establishing a database connection

It was working a few days ago, before the PHP buildpack v95 fiasco, could this be connected?

I have an unchanged Wordpress 4.5 fork that I deploy as blog

I create a dokku app, a database and link them:

$ dokku apps:create blog
$ dokku mariadb:create blog
$ dokku mariadb:link blog blog

#=> DATABASE_URL: mysql://mariadb:31fd7198d2f22978@dokku-mariadb-blog:3306/blog

I navigate to http://blog.my.domain.com to begin the Wordpress setup process, all is well. I proceed to database detail entering:

Database Name = blog
Username = mariadb
Password = 31fd7198d2f22978
Database Host = dokku-mariadb-blog:3306
Table Prefix = _wp

I click to submit these settings and Wordpress informs me that it was unable to connect to the database.

What I have tried:

Connecting to the db, no luck, access denied

$ dokku mariadb:connect blog
#=> ERROR 1045 (28000): Access denied for user 'mariadb'@'localhost' (using password: YES)

Reading the DB logs, there are some errors, but nothing stands out for me

dokku mariadb:logs blog

output gist

Restarting, stop+starting the DB

No luck.

Unlinking, destroying, rebuilding the db

Nope, new DATABASE_URL does not work either.

What is needed

A reliable way to tell if the database is absolutely definitely running or down.
I have no idea what is going wrong, it worked a few days ago. Perhaps I need to upgrade database adapter and/or plugin version?

Epigene commented 8 years ago

Meanwhile, I managed so solve this by removing containers and reinstalling mariadb plugin.

I noticed that before reinstall it reported

Status: Downloaded newer image for mariadb:10.1.10

Whereas afterwards

Status: Downloaded newer image for mariadb:10.1.13

Another thing I suspect may have played a part is that I created a database container named "blog/", and the trailing slash messing everything up.

josegonzalez commented 8 years ago

Probably the trailing slash. I upgraded all images this weekend.

If you can reproduce this, that would be great. Otherwise, closing.