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
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.
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
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
# 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.
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
MariaDB [mysql]> SELECT User, Host, plugin FROM mysql.user;
| User | Host | plugin |
| root | localhost | unix_socket |
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.