Skip to content

Conversation

@steves2j
Copy link

@steves2j steves2j commented Jan 6, 2026

Added instructions to enable mysql_native_password plugin and set MySQL root user password.

Got a PR for us? Awesome 🎊!

Please take a minute to explain the change you're proposing:

  • Why are you making it?
  • What does it do?
  • Why is this something Ghost users or developers need?

Note

Updates Ubuntu install docs for MySQL setup on newer servers.

  • Adds steps to re-enable mysql_native_password in /etc/mysql/mysql.conf.d/mysql.cnf ([mysqld] mysql_native_password=ON)
  • Clarifies setting the MySQL root password using ALTER USER ... IDENTIFIED WITH 'mysql_native_password'
  • Minor formatting and newline fix

Written by Cursor Bugbot for commit dba5941. This will update automatically on new commits. Configure here.

Added instructions to enable mysql_native_password plugin and set MySQL root user password.
@coderabbitai
Copy link

coderabbitai bot commented Jan 6, 2026

Walkthrough

The changes modify the Ubuntu installation documentation file to add guidance on enabling the mysql_native_password plugin. A new guidance block with sample commands and configuration snippet is included that instructs users to edit the MySQL configuration file to set mysql_native_password=ON. The MySQL password section has been restructured to present this new plugin guidance before password setup commands. A minor formatting adjustment removes a leading newline in the final "What's next?" section.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: updating MySQL installation instructions for Ubuntu.
Description check ✅ Passed The description is directly related to the changeset, explaining the addition of mysql_native_password plugin instructions and root password configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI Agents
In @install/ubuntu.mdx:
- Around line 102-110: Update the documentation block that currently references
`mysql_native_password=ON`, `/etc/mysql/mysql.conf.d/mysql.cnf`, and the phrase
"plugin are deprecated": replace the filename with `mysqld.cnf` (the correct
MySQL config file name), replace the deprecated setting
`mysql_native_password=ON` with the MySQL 8.0-compatible setting
`default_authentication_plugin=mysql_native_password`, correct the grammar to
"plugin is deprecated", and clarify the path/command so it consistently
instructs users to edit `/etc/mysql/mysql.conf.d/mysqld.cnf` to add the
`[mysqld]` section with the new setting.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fac7259 and dba5941.

📒 Files selected for processing (1)
  • install/ubuntu.mdx
🧰 Additional context used
📓 Path-based instructions (1)
**/*.mdx

📄 CodeRabbit inference engine (CLAUDE.md)

Use MDX format for all content files (guides, homepage, quickstart, etc.)

Files:

  • install/ubuntu.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (2)
install/ubuntu.mdx (2)

111-111: Clear and actionable heading.

The heading effectively introduces the MySQL password setup commands and provides clear context for users.


254-254: LGTM - formatting improvement.

The minor formatting adjustment improves document flow without changing the content.

Comment on lines +102 to +110
On newer versions of Ubuntu, the root user created when you install MySQL will by default be configured to use socket-based authentication, meaning that only the root Unix user will be able to authenticate. Ghost does not support this kind of authentication, so you must change the root MySQL user to have a password.
Also on newer mysql servers 'mysql_native_password' plugin are deprecated you will need to add the following to the mysql config to re-enable this plugin.
```bash
#add to /etc/mysql/*/mysql.cnf
sudo vi /etc/mysql/mysql.conf.d/mysql.cnf
[mysqld]
mysql_native_password=ON
```

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, let's read the file to see the actual content at lines 102-110
cd /tmp && find . -name "ubuntu.mdx" -type f 2>/dev/null | head -5

Repository: TryGhost/Docs

Length of output: 39


🏁 Script executed:

# List files to understand the structure
git ls-files | grep -E "ubuntu\.mdx|install.*\.mdx" | head -10

Repository: TryGhost/Docs

Length of output: 230


🏁 Script executed:

# Read the specific lines in the file
git ls-files | grep "ubuntu.mdx" | head -1 | xargs -I {} sed -n '95,115p' {}

Repository: TryGhost/Docs

Length of output: 882


🌐 Web query:

MySQL mysql_native_password configuration syntax and Ubuntu 22.04 24.04 compatibility - is mysql_native_password=ON correct for MySQL 8

💡 Result:

Short answer: It depends on the MySQL release.

  • MySQL 8.4 (upstream): the server-side plugin is built-in but disabled by default; to enable it you may start the server with --mysql-native-password=ON or add mysql_native_password=ON to the [mysqld] section of my.cnf. [1][2]

  • MySQL 8.0 (the version shipped on Ubuntu 22.04 / 24.04 packages): mysql_native_password is available (and was the legacy default prior to 8.0.4) but is not enabled/selected by default on modern 8.0.x installs (caching_sha2_password is the default authentication plugin). For compatibility you typically either set default_authentication_plugin=mysql_native_password in my.cnf or create/alter accounts with IDENTIFIED WITH 'mysql_native_password' (or ALTER USER ... IDENTIFIED BY ...). Using mysql_native_password=ON in [mysqld] is a documented 8.4 option, but on Ubuntu’s packaged MySQL 8.0.x you should instead use default_authentication_plugin or per-user IDENTIFIED WITH. [1][3][4]

Sources:
[1] MySQL Reference Manual — Native pluggable authentication; enabling with --mysql-native-password=ON / mysql_native_password=ON.
[2] Oracle MySQL docs (same section).
[3] MySQL 8.0 notes: caching_sha2_password is the preferred default; mysql_native_password is deprecated.
[4] Ubuntu package pages / docs showing Ubuntu 22.04 and 24.04 ship MySQL 8.0.x packages.

If you tell me the exact MySQL package/version you have on your Ubuntu host (output of mysql --version or apt policy mysql-server), I’ll give the precise my.cnf setting and an example.


🌐 Web query:

Ghost CMS MySQL authentication requirements mysql_native_password deprecated

💡 Result:

Short answer: Ghost (which uses Node MySQL client libraries) historically requires a MySQL account that the Node connector can authenticate with; many Ghost installs hit the MySQL 8+ problem where the server’s default caching_sha2_password auth is not supported by older Node/MySQL clients, so people either (A) create/alter the Ghost DB user to use mysql_native_password (or enable that plugin on the server) or (B) ensure the Node MySQL connector in use supports caching_sha2_password. See sources below for details and commands.

Key points and actions

  • MySQL: mysql_native_password was deprecated in MySQL 8.x (deprecated in 8.0.34, disabled by default in 8.4, removed in MySQL 9.x). You can still enable/use it on some 8.x installs but it may be unavailable in future MySQL releases. (dev.mysql.com)
  • Ghost / Node clients: older Node MySQL clients do not support caching_sha2_password; many Ghost forum threads and issues show the common fix is to ALTER the Ghost DB user to mysql_native_password (or use an updated connector that supports SHA-2). Example ALTER command: ALTER USER 'ghost'@'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpassword'; FLUSH PRIVILEGES; (forum.ghost.org)
  • If your MySQL server no longer provides mysql_native_password (e.g., MySQL 9+ or 8.4 with the plugin disabled), options are: enable mysql_native_password at server start if the MySQL build still supports it (mysqld --mysql-native-password=ON), upgrade/replace the Node MySQL connector to one supporting caching_sha2_password, or recreate the Ghost DB user with caching_sha2_password if your connector supports it. (dev.mysql.com)

References

  • MySQL docs: native pluggable authentication / deprecation details. (dev.mysql.com)
  • MySQL docs: caching_sha2_password (default since 8.0). (dev.mysql.com)
  • Ghost forum / community reports on ER_NOT_SUPPORTED_AUTH_MODE and recommended ALTER USER workaround. (forum.ghost.org)

If you want, tell me your MySQL version and Ghost/node versions and I’ll give the exact ALTER USER command or connector upgrade steps tailored to your setup.

Citations:


🏁 Script executed:

# Verify the correct MySQL config filename on Ubuntu systems
cat /etc/mysql/mysql.conf.d/* 2>/dev/null | head -20

Repository: TryGhost/Docs

Length of output: 39


🏁 Script executed:

# Check what files actually exist in that directory
find /etc/mysql -name "*.cnf" 2>/dev/null | head -20

Repository: TryGhost/Docs

Length of output: 39


🌐 Web query:

Ubuntu MySQL configuration file location /etc/mysql/mysql.conf.d/ which file mysqld.cnf vs mysql.cnf correct

💡 Result:

Short answer: use mysqld.cnf for server ([mysqld]) settings; mysql.cnf (or my.cnf) holds client or global includes. Ubuntu’s /etc/mysql/my.cnf includes both /etc/mysql/conf.d/ and /etc/mysql/mysql.conf.d/, and the server reads [mysqld] stanzas from /etc/mysql/mysql.conf.d/mysqld.cnf. [1][2][3]

If you want to confirm on your system run:
mysql --help | grep -A1 "Default options"
or inspect /etc/mysql/my.cnf to see the included directories. [3]


Critical: MySQL configuration syntax incompatible with Ubuntu 22.04/24.04 (MySQL 8.0.x) — update to use correct settings and fix filename.

The configuration guidance is technically incorrect for the target Ubuntu versions:

  1. Wrong syntax for MySQL 8.0.x: Line 108 shows mysql_native_password=ON, but Ubuntu 22.04/24.04 ship MySQL 8.0.x, which requires default_authentication_plugin=mysql_native_password instead. The mysql_native_password=ON syntax only works on MySQL 8.4+. Users following this will encounter authentication errors.

  2. Wrong filename: Line 106 uses /etc/mysql/mysql.conf.d/mysql.cnf, but MySQL reads [mysqld] settings from /etc/mysql/mysql.conf.d/mysqld.cnf.

  3. Grammar error: "plugin are deprecated" should be "plugin is deprecated" (line 103).

  4. Path/formatting confusion: The comment on line 105 (#add to /etc/mysql/*/mysql.cnf) and the command path on line 106 don't align, adding further confusion.

Update the configuration block to:

  • Use /etc/mysql/mysql.conf.d/mysqld.cnf (correct filename)
  • Use default_authentication_plugin=mysql_native_password for MySQL 8.0.x compatibility
  • Fix grammar and clarify instructions
🤖 Prompt for AI Agents
In @install/ubuntu.mdx around lines 102 - 110, Update the documentation block
that currently references `mysql_native_password=ON`,
`/etc/mysql/mysql.conf.d/mysql.cnf`, and the phrase "plugin are deprecated":
replace the filename with `mysqld.cnf` (the correct MySQL config file name),
replace the deprecated setting `mysql_native_password=ON` with the MySQL
8.0-compatible setting `default_authentication_plugin=mysql_native_password`,
correct the grammar to "plugin is deprecated", and clarify the path/command so
it consistently instructs users to edit `/etc/mysql/mysql.conf.d/mysqld.cnf` to
add the `[mysqld]` section with the new setting.

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

Successfully merging this pull request may close these issues.

1 participant