Coder Social home page Coder Social logo

Comments (5)

fmartingr avatar fmartingr commented on June 21, 2024

Hey @Oxyaxion, sorry that you are experiencing problems with the latest Shiori version. Let me address the two issues separately:

  1. The connection URL can contain special characters (I'm guessing you refer to that when you say strong password), but you have to URL encode the entire parameter, since it's an URL, that should work.
  2. Do you know which version you rolled back to? The five you see is the migration number 5 which adds a column to the database. I believe the system is trying to rollback the database changes as well, but since the version is older it can't find this file.

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 schema_migrations table to see which state it is in and we can follow from there.

from shiori.

Oxyaxion avatar Oxyaxion commented on June 21, 2024

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 --version or -v to catch the version ...

from shiori.

Oxyaxion avatar Oxyaxion commented on June 21, 2024

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

setenv SHIORI_DATABASE_URL "mysql://shiori_user:PASSWORDENCODED@tcp(172.16.0.20:3306)/shiori_db?charset=utf8mb4" ; /usr/local/sbin/shiori server -p 7070 --log-level debug

Output :

error opening database error="failed to parse database URL: parse \"mysql://shiori_user:PASSWORDENCODED@tcp(172.16.0.20:3306)/shiori_db?charset=utf8mb4\": invalid port \":3306)\" after host"

With a slightly different option, removing the parentheses, the error is different, but no better.

setenv SHIORI_DATABASE_URL "mysql://shiori_user:[email protected]:3306/shiori_db?charset=utf8mb4" ; /usr/local/sbin/shiori server -p 7070 --log-level debug

FATA[2024-03-24T10:04:00Z] error opening database  error="default addr for network '172.16.0.20:3306' unknown"

MySQL runs on another instance.

from shiori.

Oxyaxion avatar Oxyaxion commented on June 21, 2024

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 :

# setenv SHIORI_DATABASE_URL "mysql://shiori_user:PasswordWithoutSpecialChar@tcp(172.16.0.20)/shiori_db?charset=utf8mb4" ; /usr/local/sbin/shiori server -p 7070 --log-level debug

Also luckily the port is by default 3306 because it looks like it also does not work by giving the port on the URL ....

FATA[2024-03-24T10:47:28Z] error opening database error="failed to parse database URL: parse \"mysql://shiori_user:PasswordWithoutSpecialChar@tcp(172.16.0.20:3306)/shiori_db?charset=utf8mb4\": invalid port \":3306)\" after host"

That could be an issue with specifics setup.

In any case, thanks for pointing me on the "UTF Encoding" and for your quick support !

from shiori.

fmartingr avatar fmartingr commented on June 21, 2024

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.

from shiori.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.