Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create database #97

Open
SpazShark opened this issue Oct 7, 2019 · 17 comments
Open

Cannot create database #97

SpazShark opened this issue Oct 7, 2019 · 17 comments

Comments

@SpazShark
Copy link

Hi Mike!

Love this software but when I built this on my Ubuntu 18.04 system in a container it was throwing an error that the database could not be created.

I installed using docker compose by executing this command after downloading the unmodified docker-compose.yml file:
docker-compose -f ~/docker/docker-compose.yml up -d

I'm admittedly new at all this so please tell me if I'm missing something!

@MikeDombo
Copy link
Owner

Can you please try updating the version of mysql in the docker compose file to version 8. This should look like

mysql:
    image: 'mysql:8'

@SpazShark
Copy link
Author

That was fast! Tried it and got this:

ERROR: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
Fatal error: Uncaught PDOException: PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password] in /var/www/html/classes/DB/MySQLDAL.php:78 Stack trace: #0 /var/www/html/classes/DB/MySQLDAL.php(78): PDO->__construct('mysql:host=mysq...', 'root', 'password') #1 /var/www/html/classes/GlobalFunctions.php(237): AudioDidact\DB\MySQLDAL->__construct('mysql:host=mysq...') #2 /var/www/html/header.php(64): AudioDidact\GlobalFunctions::getDAL() #3 /var/www/html/index.php(3): require_once('/var/www/html/h...') #4 {main} Next PDOException: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client in /var/www/html/classes/DB/MySQLDAL.php:78 Stack trace: #0 /var/www/html/classes/DB/MySQLDAL.php(78): PDO->__construct('mysql:host=mysq...', 'root', 'password') #1 /var/www/html/classes/GlobalFunctions.php(237): AudioDidact\DB\MySQLDAL->__construct('mysql:host=mysq...') #2 /var/www/html/header.php(64): AudioDidact\GlobalFunctions::getDAL() #3 /var/www/html/index in /var/www/html/classes/DB/MySQLDAL.php on line 78

@MikeDombo
Copy link
Owner

Looks like they updated the default authentication. Please change it now to

mysql:
    image: 'mysql:8'
    command: --default-authentication-plugin=mysql_native_password
    ... rest of the config ...

@SpazShark
Copy link
Author

First of all thanks for the help here!

The page loads now and I get this at the top of the first page on the site:

"The database needs to be created, this will be completed automatically..."

Attached are the logs that I see for each container:
mysql log.txt
audiodidact log.txt

@MikeDombo
Copy link
Owner

Does it put that up every time you load the page? It should only show up the first time.

@SpazShark
Copy link
Author

Every time I load up the page.

@MikeDombo
Copy link
Owner

MikeDombo commented Oct 7, 2019

Ok no problem. I just made a change which I'm fairly sure will fix the issue. Docker will rebuild shortly and then if you run docker compose again it should pull down the latest version. If not, you can add --pull to the command and that should get docker compose to look for an update.

@MikeDombo
Copy link
Owner

The new build is now available.

@SpazShark
Copy link
Author

Ok I tried it but not sure if I'm using the pull command correctly. I did this:
docker-compose pull
docker-compose -f ~/docker/docker-compose.yml up -d

It didn't work. Same error as before. So I rolled back the VM to a state before I started installing and just ran the regular docker-compose command:
docker-compose -f ~/docker/docker-compose.yml up -d

Still same problem. Thanks again for helping. :) New Logs attached
Audiodidact.txt
mysql.txt

@MikeDombo
Copy link
Owner

I'll try on my computer shortly, but I'd try going back to mysql 5.7.

@SpazShark
Copy link
Author

Ok went back to mysql 5.7 and the new build appears to be working!

The only issue now is that my RSS feed doesn't seem to be updating when I upload content. However, I can see and play files it under 'Feed Items' on the user page. So whatever updates the RSS feed doesn't seem to be working.

So close!!

@MikeDombo
Copy link
Owner

OK good. The RSS feed is automatically updated when you add any videos. If adding any of them fails then it will not update the feed. So I don't know why it wouldn't be updated if you can see it on the site. Are you checking the feed yourself, or using podcast app? If you just load the XML yourself it should definitely be up to date, but if you're using an app then many of them cache for quite a while before they will actually update again.

@SpazShark
Copy link
Author

SpazShark commented Oct 8, 2019 via email

@MikeDombo
Copy link
Owner

And have you tried putting yet another thing into the feed? That should cause it to be generated again. There is no other way to generate the feed except to put something into it.

@MikeDombo
Copy link
Owner

MikeDombo commented Oct 8, 2019

The text of the feed is stored in the database, so if there's something wrong with the connection to the database then it won't be able to update it. You may want to check the audiodidact log again to see if there are any errors.

@SpazShark
Copy link
Author

Ok I'll look at it again tonight and report back!

@SpazShark
Copy link
Author

SpazShark commented Oct 8, 2019

Ok so I quickly built a Ubuntu server in Azure with docker and was able to install everything just fine, including having a successfully updated RSS feed.
Then on my home Ubuntu Server (on Hyper-V) I did the same thing and still have the problem of the RSS feed not updating.
One thing that I noticed is that in the working version, I see a message of "Successfully Uploaded!" in the progress bar when I upload a file.
If I replicate the same upload on my non-working server, it just sits at 100% and I never see the "Successfully Uploaded!" message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants