If your MySQL database is not correctly configured for Ghost, then you may run into some issues.
ghost-cli
. If you’re having problems with an unsupported custom install, check out the forum.
ECONNREFUSED
ECONNREFUSED
error, which refers to port 3306
, Ghost wasn’t able to connect to your MySQL server and you need to check if your server is running via the command line.
To fix this issue:
sudo service mysql start
mysql
in the command line and checking the responseghost install
, once resolved, re-run the setup phase using ghost setup
ER_BAD_FIELD_ERROR
ANSI_QUOTES
sql mode or by combination modes such as ANSI
that include ANSI_QUOTES
. To check your sql mode, run SELECT @@sql_mode
in mysql.
To fix this issue:
my.cnf
file (see below)ANSI_QUOTES
or ANSI
from the sql_mode
lineER_FK_COLUMN_CANNOT_CHANGE
STRICT_TRANS_TABLES
sql mode.
To fix this issue:
my.cnf
file (see below)STRICT_TRANS_TABLES
to the sql_mode
lineER_TOO_BIG_ROWSIZE
row_format
of a table determines how it is stored, and this introduces limits on the size of the data. Older versions of MySQL and MariaDB used a different default row_format
of COMPACT
or REDUNDANT
, which have stricter row size limits. The default on the latest version is DYNAMIC
, which is what we support.
show table status;
whilst attached to the database in MySQLRow_format
says COMPACT
or REDUNDANT
, this table needs updating to DYNAMIC
.DYNAMIC
format:
DYNAMIC
moving forwards)ALTER TABLE <table> ROW_FORMAT=DYNAMIC;
show table status;
should report all tables are DYNAMIC
and the problem should be solvedER_CANT_CREATE_TABLE
with “Foreign key constraint is incorrectly formed” or ER_FK_INCOMPATIBLE_COLUMNS
utf8mb4_general_ci
for 5.7, utf8mb4_0900_ai_ci
for 8.0). - https://dev.mysql.com/doc/refman/8.0/en/charset-connection.htmlshow variables like '%collation_connection%';
.
mysql --help
and look for the line “Default options are read from the following files in the given order:”sudo find / -name my.cnf
although the file can be called either my.cnf
or .my.cnf
mysql --help
.sql_mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION