Code Monkey home page Code Monkey logo

Comments (6)

ExplodingCabbage avatar ExplodingCabbage commented on June 16, 2024

Some further commentary:

mysql2, the library you use to connect to MySQL, supports socket-based connections like this...

conn = mysql.createConnection({socketPath: '/var/run/mysqld/mysqld.sock', user: 'root'})

... but obviously you'd need to run that from within a process that's running as root, which seems awkward since you deliberately don't allow ghost install to be run as root.

Maybe the best approach here is to run the commands to create the Ghost user via the shell using your ui.sudo function, only when the host is localhost, the user is root, password auth has failed, and a Ghost user needs creating? I'm not sure if I'm overcomplicating things here and the better solution is just a docs changing telling the user to give root a password...

from ghost-cli.

carrickspeirs avatar carrickspeirs commented on June 16, 2024

Also ran into this error when using Digital Oceans 1-click droplet. Most of what you said above went straight over my head. Is there a quick fix before someone looks at the bug?

from ghost-cli.

MarkAmeryCurative avatar MarkAmeryCurative commented on June 16, 2024

@carrickspeirs yes - see the instructions in the quote block that I suggest adding to the docs. Basically the fix is:

  1. Run ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'somepassword';
  2. Enter somepassword as the root password when installing Ghost

It's unfortunate we have to do this, though, because it weakens the security of our MySQL install a bit.

from ghost-cli.

daniellockyer avatar daniellockyer commented on June 16, 2024

You're right, our docs need work here. We should be able to tidy these up next week πŸ™‚

from ghost-cli.

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.