openproject 配置抛出 "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)"?
openproject configure throws "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)"?
根据CentOS 7文档(https://www.openproject.org/download-and-installation/#installation)安装openproject,运行sudo openproject configure
后,得到如下错误输出:
➜ ~ sudo openproject configure
Launching installer for openproject...
Selected addons: legacy-installer mysql apache2 repositories smtp memcached openproject
[legacy-installer] ./bin/configure
[mysql] ./bin/configure
DONE
[apache2] ./bin/configure
DONE
[repositories] ./bin/configure
DONE
[smtp] ./bin/configure
DONE
[memcached] ./bin/configure
DONE
[openproject] ./bin/configure
[legacy-installer] ./bin/preinstall
[mysql] ./bin/preinstall
[apache2] ./bin/preinstall
Note: Forwarding request to 'systemctl enable httpd.service'.
[repositories] ./bin/preinstall
[smtp] ./bin/preinstall
[memcached] ./bin/preinstall
No memcached server to install. Skipping.
[openproject] ./bin/preinstall
[legacy-installer] ./bin/postinstall
[mysql] ./bin/postinstall
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
以前从未使用过 MariaDB,但通过一些基本检查(在 https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password 之后安装)
➜ ~ mysqladmin -u root -p version
Enter password:
mysqladmin Ver 9.0 Distrib 5.5.60-MariaDB, for Linux on x86_64
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Server version 5.5.60-MariaDB
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 21 min 38 sec
Threads: 1 Questions: 16 Slow queries: 0 Opens: 7 Flush tables: 2 Open tables: 25 Queries per second avg: 0.012
(密码只是空白)数据库似乎在工作并且可以访问。删除并重新安装 mariadb-server 包似乎也不会改变行为。以前从未使用过 openproject 或 mysql / mariadb,因此,如果您对此处可能发生的情况提出任何建议,我们将不胜感激。
您是否在配置步骤中选择了 Install and configure MySQL server locally
?
如果是这样,程序包应自动配置随机 MySQL root 密码,该密码存储在 /etc/openproject/installer.dat
的密钥 mysql/root_password
下。如果您仍然可以使用空密码访问数据库,则安装程序未能正确设置密码。 It appears to take input from urandom。
您可以尝试 运行 在输入 MySQL 密码提示时输入以下命令:
mysqladmin -u root -p password "<Create and insert a random password here>"
然后将 mysql/root_password
的值替换为 /etc/openproject/installer.dat
。
根据CentOS 7文档(https://www.openproject.org/download-and-installation/#installation)安装openproject,运行sudo openproject configure
后,得到如下错误输出:
➜ ~ sudo openproject configure
Launching installer for openproject...
Selected addons: legacy-installer mysql apache2 repositories smtp memcached openproject
[legacy-installer] ./bin/configure
[mysql] ./bin/configure
DONE
[apache2] ./bin/configure
DONE
[repositories] ./bin/configure
DONE
[smtp] ./bin/configure
DONE
[memcached] ./bin/configure
DONE
[openproject] ./bin/configure
[legacy-installer] ./bin/preinstall
[mysql] ./bin/preinstall
[apache2] ./bin/preinstall
Note: Forwarding request to 'systemctl enable httpd.service'.
[repositories] ./bin/preinstall
[smtp] ./bin/preinstall
[memcached] ./bin/preinstall
No memcached server to install. Skipping.
[openproject] ./bin/preinstall
[legacy-installer] ./bin/postinstall
[mysql] ./bin/postinstall
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
以前从未使用过 MariaDB,但通过一些基本检查(在 https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password 之后安装)
➜ ~ mysqladmin -u root -p version
Enter password:
mysqladmin Ver 9.0 Distrib 5.5.60-MariaDB, for Linux on x86_64
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Server version 5.5.60-MariaDB
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 21 min 38 sec
Threads: 1 Questions: 16 Slow queries: 0 Opens: 7 Flush tables: 2 Open tables: 25 Queries per second avg: 0.012
(密码只是空白)数据库似乎在工作并且可以访问。删除并重新安装 mariadb-server 包似乎也不会改变行为。以前从未使用过 openproject 或 mysql / mariadb,因此,如果您对此处可能发生的情况提出任何建议,我们将不胜感激。
您是否在配置步骤中选择了 Install and configure MySQL server locally
?
如果是这样,程序包应自动配置随机 MySQL root 密码,该密码存储在 /etc/openproject/installer.dat
的密钥 mysql/root_password
下。如果您仍然可以使用空密码访问数据库,则安装程序未能正确设置密码。 It appears to take input from urandom。
您可以尝试 运行 在输入 MySQL 密码提示时输入以下命令:
mysqladmin -u root -p password "<Create and insert a random password here>"
然后将 mysql/root_password
的值替换为 /etc/openproject/installer.dat
。