IMPORTANT, please fill the questions
We assume you are using Bitnami to deploy your application.
Which version of the application are you using?:
Please choose how you got the application: Installer (Windows, Linux, macOS), cloud image (AWS, GCE, Azure, ...) or VM (VMDK, VBOX):
AWS
Have you installed any plugin or modified any configuration file?:
No
Describe here your question/suggestion/issue (expected and actual results):
My site has the 'Error establishing a database connection' problem, and after few hours of search I found out that it is unable to start MySQL.
These are what I did after I found the problem:
mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/bitnami/mysql/tmp/mysql.sock' (2)
sudo /opt/bitnami/ctlscript.sh start mysql
/opt/bitnami/mysql/scripts/ctl.sh : mysql could not be started
Monitored mysql
mysqld --skip-grant-tables --user=mysql --pid-file=/opt/bitnami/mysql/data/mysqld.pid --skip-external-locking --port=3306 --sock=/opt/bitnami/mysql/tmp/mysql.sock
2019-10-13T15:59:22.717599Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2019-10-13T15:59:22.719533Z 0 [System] [MY-010116] [Server] /opt/bitnami/mysql/bin/mysqld.bin (mysqld 8.0.17) starting as process 8570
2019-10-13T15:59:22.728123Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2019-10-13T15:59:22.728136Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
2019-10-13T15:59:22.734444Z 0 [Warning] [MY-010091] [Server] Can't create test file /opt/bitnami/mysql/data/mysqld_tmp_file_case_insensitive_test.lower-test
2019-10-13T15:59:22.734455Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /opt/bitnami/mysql/data/ is case insensitive
2019-10-13T15:59:22.735474Z 0 [Warning] [MY-010122] [Server] One can only use the --user switch if running as root
2019-10-13T15:59:22.735497Z 0 [ERROR] [MY-013276] [Server] Failed to set datadir to '/opt/bitnami/mysql/data/' (OS errno: 13 - Permission denied)
2019-10-13T15:59:22.736643Z 0 [ERROR] [MY-010119] [Server] Aborting
2019-10-13T15:59:22.744449Z 0 [System] [MY-010910] [Server] /opt/bitnami/mysql/bin/mysqld.bin: Shutdown complete (mysqld 8.0.17) MySQL Community Server - GPL.
I also generated a Bitnami support code:
27ad60f2-d300-b736-36d5-42c1495b83bc
Thanks in advance.