-
Notifications
You must be signed in to change notification settings - Fork 15
Update MySQL installation instructions for Ubuntu #33
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
Open
steves2j
wants to merge
1
commit into
TryGhost:main
Choose a base branch
from
steves2j:patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: TryGhost/Docs
Length of output: 39
🏁 Script executed:
Repository: TryGhost/Docs
Length of output: 230
🏁 Script executed:
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
References
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:
Repository: TryGhost/Docs
Length of output: 39
🏁 Script executed:
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:
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 requiresdefault_authentication_plugin=mysql_native_passwordinstead. Themysql_native_password=ONsyntax only works on MySQL 8.4+. Users following this will encounter authentication errors.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.Grammar error: "plugin are deprecated" should be "plugin is deprecated" (line 103).
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:
/etc/mysql/mysql.conf.d/mysqld.cnf(correct filename)default_authentication_plugin=mysql_native_passwordfor MySQL 8.0.x compatibility🤖 Prompt for AI Agents