DB Install Wizard -- Cannot connect to MySQL

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
stans78
New user
New user
Posts: 9
Joined: 2009-03-27 20:14

DB Install Wizard -- Cannot connect to MySQL

Post by stans78 » 2019-02-02 02:03

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?
Windows Server 2008 R2
hMailServer v5.6 standard installation

User avatar
mattg
Moderator
Moderator
Posts: 20293
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: DB Install Wizard -- Cannot connect to MySQL

Post by mattg » 2019-02-02 02:18

Does MySQL log show anything?

You must use the 32 bit DLL to connect to the 64 bit database, because hMailserver is 32 bit
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

stans78
New user
New user
Posts: 9
Joined: 2009-03-27 20:14

Re: DB Install Wizard -- Cannot connect to MySQL

Post by stans78 » 2019-02-02 09:08

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.
Windows Server 2008 R2
hMailServer v5.6 standard installation

User avatar
Dravion
Senior user
Senior user
Posts: 1488
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: DB Install Wizard -- Cannot connect to MySQL

Post by Dravion » 2019-02-02 12:26

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).

User avatar
mattg
Moderator
Moderator
Posts: 20293
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: DB Install Wizard -- Cannot connect to MySQL

Post by mattg » 2019-02-02 13:29

Please show your hmailserver.ini with the passwords removed
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

stans78
New user
New user
Posts: 9
Joined: 2009-03-27 20:14

Re: DB Install Wizard -- Cannot connect to MySQL

Post by stans78 » 2019-02-03 01:16

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.
Windows Server 2008 R2
hMailServer v5.6 standard installation

User avatar
mattg
Moderator
Moderator
Posts: 20293
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: DB Install Wizard -- Cannot connect to MySQL

Post by mattg » 2019-02-03 02:44

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
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

stans78
New user
New user
Posts: 9
Joined: 2009-03-27 20:14

Re: DB Install Wizard -- Cannot connect to MySQL

Post by stans78 » 2019-02-05 20:56

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.
Windows Server 2008 R2
hMailServer v5.6 standard installation

Post Reply