问题:
部署word press时,浏览器访问显示“建立数据库连接时出错”

查看状态:
使用systemctl status mysql查看MySQL的状态:
[root@chinaskill-node1 ~]# systemctl status mysql
● mariadb.service - MariaDB 11.0.3 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: active (running) since Sat 2023-10-14 10:47:07 CST; 1h 2min ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Main PID: 8597 (mariadbd)
Status: "Taking your SQL requests now..."
CGroup: /system.slice/mariadb.service
└─8597 /usr/sbin/mariadbd
Oct 14 10:47:07 chinaskill-node1 mariadbd[8597]: Version: '11.0.3-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
Oct 14 10:47:07 chinaskill-node1 systemd[1]: Started MariaDB 11.0.3 database server.
Oct 14 11:08:25 chinaskill-node1 mariadbd[8597]: 2023-10-14 11:08:25 5 [Warning] Hostname 'apzg-0720e-006.stretchoid.com' does not resolve to ...247.36'.
Oct 14 11:08:25 chinaskill-node1 mariadbd[8597]: 2023-10-14 11:08:25 5 [Note] Hostname 'apzg-0720e-006.stretchoid.com' has the following IP addresses:
Oct 14 11:08:25 chinaskill-node1 mariadbd[8597]: 2023-10-14 11:08:25 5 [Note] - 127.0.0.1
Oct 14 11:08:25 chinaskill-node1 mariadbd[8597]: 2023-10-14 11:08:25 5 [Warning] Aborted connection 5 to db: 'unconnected' user: 'unauthentica...ication)
Oct 14 11:10:20 chinaskill-node1 mariadbd[8597]: 2023-10-14 11:10:20 6 [Warning] Access denied for user 'username_here'@'localhost' (using password: YES)
Oct 14 11:10:20 chinaskill-node1 mariadbd[8597]: 2023-10-14 11:10:20 7 [Warning] Access denied for user 'username_here'@'localhost' (using password: YES)
Oct 14 11:12:06 chinaskill-node1 mariadbd[8597]: 2023-10-14 11:12:06 8 [Warning] Access denied for user 'username_here'@'localhost' (using password: YES)
Oct 14 11:12:06 chinaskill-node1 mariadbd[8597]: 2023-10-14 11:12:06 9 [Warning] Access denied for user 'username_here'@'localhost' (using password: YES)
Hint: Some lines were ellipsized, use -l to show in full.
查看/usr/share/nginx/html/wp-config.php配置文件

啊!
