-
Notifications
You must be signed in to change notification settings - Fork 556
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
Investigate mysql database url using password with special characters not working #866
Comments
Hey @Oxyaxion, sorry that you are experiencing problems with the latest Shiori version. Let me address the two issues separately:
Let me know if you're willing to try number 1 again or if you prefer to keep as you are. if you do, please share the contents of your |
Thanks so much for your quick response. 1 - Yes by strong password , I meant long password with a lot of special characteres.Thank for clarification I will try with a URL Encoder. Maybe it wil help a lot ! 2 - Good question, how can I have the version in cli ? I guess there is a file somewhere in the repository that can give me the shiori version ... because looks like there is no such option like cli with |
I tried again with the 1.60 version and passsword url encoded , It can parse correctly the password field. But now it looks like it is not able to correctly parse the ip:port field or connect to the database
Output :
With a slightly different option, removing the parentheses, the error is different, but no better.
MySQL runs on another instance. |
I finally succeeded in logging in with a password WITHOUT special characters. Even encoded to UTF8 there are some characters that obviously don't work ! I don't know which ones . The good method is :
Also luckily the port is by default 3306 because it looks like it also does not work by giving the port on the URL ....
That could be an issue with specifics setup. In any case, thanks for pointing me on the "UTF Encoding" and for your quick support ! |
This seems weird, let me reopen the issue and leave this open to investigate. Glad it ended up worked on your end even if you had to lower your database security. |
Data
Describe the bug / actual behavior
I've been using shiori for months. I do regular backup of my instances.
Until now all was fine.
I have the good idea to do an upgrade with another
go install github.com/go-shiori/shiori@latest
Look like the new version changed the way we have to connect on Mysql
With something like this :
SHIORI_DATABASE_URL="mysql://username:password@(hostname:port)/database?charset=utf8mb4"
Problem this is a very poor connection method that doesn't allow strong passwords with special characters ... As I'm using hard password with ! and "#?" .
I've tried changing the database password to something simpler, but I still can't get shiori to connect to mysql .... Unable to correctly parse the mysql connection string ... Documentation is not very clear about the good parameter to use.
After several tries I decided to rollback from a previous backup (which worked perfectly I never updated it or touch anything for month). and reset my original MySQL password.
And since I only have this message on the log when I start shiori ...
"Error running migration: no migration found for version 5: read down for version 5 migrations/mysql: file does not exist"
I really don't know what happens ... And what is the missing file ?!?
The database password is correct and I can connect to it.
The text was updated successfully, but these errors were encountered: