# Ghost Install Error: Just Restart, or Cleanup First? (mysql as root?)

**URL:** <https://forum.ghost.org/t/ghost-install-error-just-restart-or-cleanup-first-mysql-as-root/49877>\
**Category:** Installation\
**Created:** [August 29, 2024, 4:41pm UTC](https://forum.ghost.org/t/ghost-install-error-just-restart-or-cleanup-first-mysql-as-root/49877 "2024-08-29T16:41:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joker-b](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/joker-b/32/29303_2.png) [@joker-b](https://forum.ghost.org/u/joker-b)\
**Post date:** [August 29, 2024, 4:41pm UTC](https://forum.ghost.org/t/ghost-install-error-just-restart-or-cleanup-first-mysql-as-root/49877/1 "2024-08-29T16:41:35Z")

</div>

I’m trying to install the current (50.90.2) Ghost on a previously-fresh Google Cloud VM (Ubuntu 22.04). All was well until…

```auto
✖ Downloading and installing Ghost v5.90.2
A ProcessError occurred.

```

which appears to have been a `yarn` error. Network burp?

I’m inclined to just run `ghost install` again, but before I do… should I clean any directories?

---

<div class="post-metadata">

**Author:** ![mjw](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mjw/32/30781_2.png) [@mjw](https://forum.ghost.org/u/mjw)\
**Post date:** [August 29, 2024, 5:31pm UTC](https://forum.ghost.org/t/ghost-install-error-just-restart-or-cleanup-first-mysql-as-root/49877/2 "2024-08-29T17:31:51Z")

</div>

Did you run `ghost install` in the Ghost folder under `/var/www`? If so, was anything created in that folder?

The output posted suggests that the installation didn’t complete downloading.

Make sure you followed this guide.

> **[How to install & setup Ghost on Ubuntu 20.04 or 22.04](https://ghost.org/docs/install/ubuntu/)**
>
> A full production install guide for how to install the Ghost professional publishing platform on a production server running Ubuntu 20.04 or 22.04.

You can use the Ghost CLI to check things, e.g., `ghost ls` and `ghost doctor`.

> **[Ghost-CLI - A fully loaded tool for installation and configuration](https://ghost.org/docs/ghost-cli/)**
>
> The best way to install, manage, and update your site locally or when self-hosting Ghost. A full guide for our advanced CLI tool.

---

<div class="post-metadata">

**Author:** ![joker-b](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/joker-b/32/29303_2.png) [@joker-b](https://forum.ghost.org/u/joker-b)\
**Post date:** [August 29, 2024, 7:40pm UTC](https://forum.ghost.org/t/ghost-install-error-just-restart-or-cleanup-first-mysql-as-root/49877/3 "2024-08-29T19:40:12Z")

</div>

Thanks… actually running `ghost install` again seemed to work, but I get a SQL error about something wanting to run as `root` which is weird becasue I can certainly log into mysql on that account.

`Error: Access denied for user 'root'@'localhost'`

Is there a way to change Ghost’s behavior here?

`ghost doctor` shows no error, `ghost ls` shows, as you might expect, that the server is stopped.

From `journalctl` (`ghost-botz-2024` is the machine name):

```auto
Aug 29 19:33:31 ghost-botz-2024 node[23667]: Error ID:
Aug 29 19:33:31 ghost-botz-2024 node[23667]: 500
Aug 29 19:33:31 ghost-botz-2024 node[23667]: Error Code: 
Aug 29 19:33:31 ghost-botz-2024 node[23667]: ER_ACCESS_DENIED_NO_PASSWORD_ERROR
Aug 29 19:33:31 ghost-botz-2024 node[23667]: ----------------------------------------
Aug 29 19:33:31 ghost-botz-2024 node[23667]: Error: Access denied for user 'root'@'localhost'
Aug 29 19:33:31 ghost-botz-2024 node[23667]: at /var/www/vumondo/versions/5.90.2/node_modules/knex-migrator/lib/database.js:57:19
Aug 29 19:33:31 ghost-botz-2024 node[23667]: at Packet.asError (/var/www/vumondo/versions/5.90.2/node_modules/mysql2/lib/packets/packet.js:738:17)
Aug 29 19:33:31 ghost-botz-2024 node[23667]: at ClientHandshake.execute (/var/www/vumondo/versions/5.90.2/node_modules/mysql2/lib/commands/command.js:29:26)
Aug 29 19:33:31 ghost-botz-2024 node[23667]: at Connection.handlePacket (/var/www/vumondo/versions/5.90.2/node_modules/mysql2/lib/connection.js:481:34)
Aug 29 19:33:31 ghost-botz-2024 node[23667]: at PacketParser.onPacket (/var/www/vumondo/versions/5.90.2/node_modules/mysql2/lib/connection.js:97:12)
Aug 29 19:33:31 ghost-botz-2024 node[23667]: at PacketParser.executeStart (/var/www/vumondo/versions/5.90.2/node_modules/mysql2/lib/packet_parser.js:75:16)
Aug 29 19:33:31 ghost-botz-2024 node[23667]: at Socket.<anonymous> (/var/www/vumondo/versions/5.90.2/node_modules/mysql2/lib/connection.js:104:25)
Aug 29 19:33:31 ghost-botz-2024 node[23667]: at Socket.emit (node:events:519:28)
Aug 29 19:33:31 ghost-botz-2024 node[23667]: at addChunk (node:internal/streams/readable:559:12)
Aug 29 19:33:31 ghost-botz-2024 node[23667]: at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
Aug 29 19:33:31 ghost-botz-2024 node[23667]: at Readable.push (node:internal/streams/readable:390:5)
Aug 29 19:33:31 ghost-botz-2024 node[23667]: 
Aug 29 19:33:31 ghost-botz-2024 node[23667]: [2024-08-29 19:33:31] WARN Ghost is shutting down
Aug 29 19:33:31 ghost-botz-2024 node[23667]: [2024-08-29 19:33:31] WARN Ghost has shut down
Aug 29 19:33:31 ghost-botz-2024 node[23667]: [2024-08-29 19:33:31] WARN Your site is now offline
Aug 29 19:33:31 ghost-botz-2024 node[23667]: [2024-08-29 19:33:31] WARN Ghost was running for a few seconds
Aug 29 19:33:31 ghost-botz-2024 node[23667]: [2024-08-29 19:33:31] INFO Bootstrap client was closed.
Aug 29 19:33:31 ghost-botz-2024 systemd[1]: Stopping Ghost systemd service for blog: www-vumondo-com...
Aug 29 19:33:32 ghost-botz-2024 node[23642]: /usr/lib/node_modules/ghost-cli/lib/process-manager.js:46
Aug 29 19:33:32 ghost-botz-2024 node[23642]: throw error;
Aug 29 19:33:32 ghost-botz-2024 node[23642]: ^
Aug 29 19:33:32 ghost-botz-2024 node[23642]: {
Aug 29 19:33:32 ghost-botz-2024 node[23642]: message: {
Aug 29 19:33:32 ghost-botz-2024 node[23642]: statusCode: 500,
Aug 29 19:33:32 ghost-botz-2024 node[23642]: errorType: 'DatabaseError',
Aug 29 19:33:32 ghost-botz-2024 node[23642]: level: 'critical',
Aug 29 19:33:32 ghost-botz-2024 node[23642]: id: 500,
Aug 29 19:33:32 ghost-botz-2024 node[23642]: help: 'Unknown database error',
Aug 29 19:33:32 ghost-botz-2024 node[23642]: code: 'ER_ACCESS_DENIED_NO_PASSWORD_ERROR',
Aug 29 19:33:32 ghost-botz-2024 node[23642]: property: null,
Aug 29 19:33:32 ghost-botz-2024 node[23642]: redirect: null,
Aug 29 19:33:32 ghost-botz-2024 node[23642]: hideStack: false,
Aug 29 19:33:32 ghost-botz-2024 node[23642]: message: "Ghost was able to start, but errored during boot with: Access denied for user 'root'@'localhost'",
Aug 29 19:33:32 ghost-botz-2024 node[23642]: name: 'DatabaseError',
Aug 29 19:33:32 ghost-botz-2024 node[23642]: errno: 1698,
Aug 29 19:33:32 ghost-botz-2024 node[23642]: sqlState: '28000',
Aug 29 19:33:32 ghost-botz-2024 node[23642]: sqlMessage: "Access denied for user 'root'@'localhost'"
Aug 29 19:33:32 ghost-botz-2024 node[23642]: }
Aug 29 19:33:32 ghost-botz-2024 node[23642]: }
Aug 29 19:33:32 ghost-botz-2024 node[23642]: Node.js v20.17.0
Aug 29 19:33:32 ghost-botz-2024 systemd[1]: ghost_www-vumondo-com.service: Main process exited, code=exited, status=1/FAILURE
Aug 29 19:33:32 ghost-botz-2024 systemd[1]: ghost_www-vumondo-com.service: Failed with result 'exit-code'.
Aug 29 19:33:32 ghost-botz-2024 systemd[1]: Stopped Ghost systemd service for blog: www-vumondo-com.
Aug 29 19:33:32 ghost-botz-2024 systemd[1]: ghost_www-vumondo-com.service: Consumed 2.677s CPU time.

```

---

<div class="post-metadata">

**Author:** ![mjw](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mjw/32/30781_2.png) [@mjw](https://forum.ghost.org/u/mjw)\
**Post date:** [August 29, 2024, 9:38pm UTC](https://forum.ghost.org/t/ghost-install-error-just-restart-or-cleanup-first-mysql-as-root/49877/4 "2024-08-29T21:38:16Z")

</div>

> [@joker-b](#):
>
> Is there a way to change Ghost’s behavior here?

Nothing to do with Ghost. A clean install of Ubuntu doesn’t authenticate MySQL using a password, so you’ll need to change this to native password.

In MySQL use:

```auto
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'

```

I’d create a database user for Ghost and avoid using the root account.
