Page 1 of 1

DB Install Wizard -- Cannot connect to MySQL

Posted: 2019-02-02 02:03
by stans78
I'm moving an hMailServer installation (5.6-B2145) to a new server--from Win2008 R2 to Win2012 Std.

I found and followed* the instructions in the tutorial forum. I first copied the libmysql.dll file from the old server to the new, then tried the newer version linked in the tutorial, both to no avail. I still get the 'cannot connect...' message at step 6 of the wizard. I checked the HMS log file and there were no additional messages other than the first saying libmysql.dll wasn't found.

I am able to connect to MySQL via Workbench with the same root password I use for the HMS wiz.

MySQL(v5.5.61) and Workbench are 64 bit.

Looked for other similar topics but found none helpful.

Not sure what to do next; looked at firewall settings on both systems and they looked similar.

*I did not change the database directory when I installed MySQL; is this necessary?

Re: DB Install Wizard -- Cannot connect to MySQL

Posted: 2019-02-02 02:18
by mattg
Does MySQL log show anything?

You must use the 32 bit DLL to connect to the 64 bit database, because hMailserver is 32 bit

Re: DB Install Wizard -- Cannot connect to MySQL

Posted: 2019-02-02 09:08
by stans78
Negative, MySQL log shows nothing.

Pretty sure I'm using 32 bit DLL. First I tried the one from old server hms bin directory (works fine there), then the one linked in the tutorial forum. Neither works on the new Win 2012 server.

Re: DB Install Wizard -- Cannot connect to MySQL

Posted: 2019-02-02 12:26
by Dravion
You didnt provide MySQL Version Info.

Is this MySQL 8.x 64-Bit?
If it is MySQL 8.x 64-Bit did you install it in
Legacmode so oldeR MySQL Clients can connecto to it? (required).

Re: DB Install Wizard -- Cannot connect to MySQL

Posted: 2019-02-02 13:29
by mattg
Please show your hmailserver.ini with the passwords removed

Re: DB Install Wizard -- Cannot connect to MySQL

Posted: 2019-02-03 01:16
by stans78
I'm using MySQL version 5.5.61 64 bit.

Here's the HMS ini file:
[Directories]
ProgramFolder=C:\Program Files (x86)\hMailServer
DatabaseFolder=C:\Program Files (x86)\hMailServer\Database
DataFolder=C:\Program Files (x86)\hMailServer\Data
LogFolder=C:\Program Files (x86)\hMailServer\Logs
TempFolder=C:\Program Files (x86)\hMailServer\Temp
EventFolder=C:\Program Files (x86)\hMailServer\Events
[GUILanguages]
ValidLanguages=english,swedish
[Security]
AdministratorPassword=*********

This is a fresh install and I have yet to run the HMS Administrator program.

The old server that I'm moving from uses MySQL 5.1.56, probably 64 bit, but not certain. I'll try to find out.

Re: DB Install Wizard -- Cannot connect to MySQL

Posted: 2019-02-03 02:44
by mattg
There should also be a database section...

add something like this to the bottom of your hmailserver.ini

Code: Select all

[Database]
Type=MYSQL
Username=root
Password=********
PasswordEncryption=0
Port=3306
Server=localhost
Database=hmailserver
Internal=0
More detail Here >> https://www.hmailserver.com/documentati ... lesettings

You should then run the ./hmailserver/bin/dbsetup.exe

Re: DB Install Wizard -- Cannot connect to MySQL

Posted: 2019-02-05 20:56
by stans78
OK, I was able to successfully complete the HMS database installation after I removed the 64-bit MySQL and replace it with a 32-bit older version (v. 5.1.56). This duplicates my currently working configuration.

Thanks mattg and Dravion for the assists.