So deployment was straight forward but now Iām stuck in the installer.
The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password
The db (empty) and user with full access to that db were created by our deployment script.
mysql and suitecrm are running on same box.
On the same server, connecting to mysql using same details over commandline works fine:
root@suitecrm:/opt/apps# mysql --host=localhost --port=3306 --user=suitecrm --password suitecrm
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 183
Server version: 8.0.23-0ubuntu0.20.04.1 (Ubuntu)
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> \s
--------------
mysql Ver 8.0.23-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))
Connection id: 183
Current database: suitecrm
Current user: suitecrm@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 8.0.23-0ubuntu0.20.04.1 (Ubuntu)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8mb4
Db characterset: utf8mb4
Client characterset: utf8mb4
Conn. characterset: utf8mb4
UNIX socket: /var/run/mysqld/mysqld.sock
Binary data as: Hexadecimal
Uptime: 1 hour 43 min 44 sec
Threads: 2 Questions: 9513 Slow queries: 0 Opens: 356 Flush tables: 3 Open tables: 274 Queries per second avg: 1.528
--------------
mysql>
It looks like using localhost led to mysql using the socket instead of tcp/ip. Trying again with 127.0.0.1ā¦
root@suitecrm:/opt/apps# mysql --host=127.0.0.1 --port=3306 --user=suitecrm --password suitecrm
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 191
Server version: 8.0.23-0ubuntu0.20.04.1 (Ubuntu)
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> \s
--------------
mysql Ver 8.0.23-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))
Connection id: 191
Current database: suitecrm
Current user: suitecrm@localhost
SSL: Cipher in use is TLS_AES_256_GCM_SHA384
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 8.0.23-0ubuntu0.20.04.1 (Ubuntu)
Protocol version: 10
Connection: 127.0.0.1 via TCP/IP
Server characterset: utf8mb4
Db characterset: utf8mb4
Client characterset: utf8mb4
Conn. characterset: utf8mb4
TCP port: 3306
Binary data as: Hexadecimal
Uptime: 1 hour 44 min 46 sec
Threads: 2 Questions: 9539 Slow queries: 0 Opens: 361 Flush tables: 3 Open tables: 279 Queries per second avg: 1.517
--------------
mysql>
Iāve tried giving suitecrm localhost
, localhost:3306
, 127.0.0.1
, etcā¦no luck.
Conclusionsā¦
- credentials, dbname, username are all correct
- mysql is running on port 3306 and open to network connections
- suitecrm doesnāt connect but doesnāt provide any further details on what the problem is. The error message is not particularly helpful at narrowing down the problem.
Any ideas? Nothing useful in php, nginx or mysql error logs. The suitecrm install.log has the same useless message as in the UI. Am I missing something obvious?