Laptop with new installation of Ubuntu 16.04.
MySQL DB v5.7.
I followed the advice for launching Rancher Server - single container - external database.
Resolution - could not connect to database
My laptop was my host, so I pointed to it’s IP address on the LAN (192.168.1.x). I had also tried localhost and 127.0.0.1, but these didn’t work.
As a relative newbie, I then spent several hours searching to see what I could do when it didn’t connect (per the logs). I also searched the forum.
As it may save others some time, the solution was to do with the ‘bind-address’ setting in my.cnf.
Found in /etc/mysql/my.cnf or
/etc/mysql/mysql.conf.d/mysqld.cnf (for me, it was this one)
Options were to comment (with ‘#’) the line:
bind-address = 127.0.0.1
or to change the address to show:
bind-address = 0.0.0.0
I chose the latter.
Resolution - wait for migration
I had previously set up a Rancher Server with a bound mounted MySQL volume, and that was very quick to complete. I had also set up Rancher Server without a bound volume, and that also only took a couple of minutes.
When I had solved the ‘bind-address’ issue above, I was looking at the logs and saw a message about beginning a ‘migration’. I couldn’t understand why that would be, because I wasn’t upgrading Rancher Server. At least a couple of times I lost patience and aborted the process, because the log file for the Rancher Server was not progressing. The third time I was a little more patient, and after about 25 minutes (my laptop is quite old), the migration process completed, and the Rancher Server set up process continued quite rapidly after that.
I hope that my experience and the resolutions may save some others a little time.