As with many posts in the forum, I also had this error while trying to install SuiteCRM. This is how I solved it.
The base LAMP install in Debian 9 and Debian 8 does a few things differently when setting defaults. So when I last did a clean installed on Debian 7, it went without issue. The following are probably necessary on Ubuntu too. (Maybe other Linuxes?)
Things to check and fix:
Make sure the port 3306 tcp is open in the firewall. It wasnāt open by default after the MariaDB or MySQL install.
Check you can access MySQL/MariaDB on the localhost. If you can login you should get something like this:
mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 101
Server version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
It is likely that MySQL isnāt listening on the network. So check
It looks like the post cut off the other 3 things to check so Iāll add them here.
3) It is likely that MySQL isnāt listening on the network. So check Configure MariaDB for remote client access
I added following to /etc/mysql/my.cnf
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
# Instead of skip-networking the default is now to listen only on
# # localhost which is more compatible and is not less secure.
bind-address = 0.0.0.0
In my case I set up Apache to have the SuiteCRM install in /var/www/suitecrm. So there were localhost at 127.0.0.1 and suitecrm.domain.tld at 127.0.1.1. With bind-address 0.0.0.0 all local network connections should be able to connect to the db.
Step 4)
Debian and Ubuntu (maybe other Linuxes) changed the default authorization on mysql installs. So you have to change this. See mysql authorization change.
MariaDB [(none)]> USE mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [mysql]> SELECT User, Host, plugin FROM mysql.user;
+------+---------------+-------------+
| User | Host | plugin |
+------+---------------+-------------+
| root | localhost | unix_socket |
+------+---------------+-------------+
Step 5) In the install script for SuiteCRM it will pull the IP address of the server to put in the database location. This didnāt work for me. I had to enter ālocalhostā in the dialog box instead.
Anyway, in what regards Debian, thanks for sharing your notes here, if everybody did that after solving their particular installation problems weād have a great ādatabaseā of installation troubleshooting instructions by now. Iām sure this will help someone in the future.