HMailserver - Move Database

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
User avatar
LVTS
New user
New user
Posts: 27
Joined: 2019-05-30 11:44
Location: England
Contact:

HMailserver - Move Database

Post by LVTS » 2020-05-21 18:26

Hello there,

I wanted to move my HMailserver database to SQL. I opened the Database Set-up application and filled out the appropiate information but at the final step I receive this error message:

Code: Select all

Starting task...
Please wait while updating database settings...
Error:
The MySQL client (libmysql.dll, 32 bit) could not be loaded.
hMailServer needs this file to be able to connect to MySQL.
The MySQL client needs to be manually copied to the hMailServer Bin directory. The file is not included in the hMailServer installation.
Path: C:\Program Files (x86)\hMailServer\Bin\libmysql.dll
Does anyone known where I can obtain a clean version of the libmysql.dll file? So I can complete this process?

Many Thanks.

palinka
Senior user
Senior user
Posts: 2189
Joined: 2017-09-12 17:57

Re: HMailserver - Move Database

Post by palinka » 2020-05-21 18:59

Its not included so you have to get it from your database provider. For example, I'm using MariaDB, so I looked up my version, then went to MariaDB's downloads section, downloaded the zip version of MariaDB, opened the zip, found and extracted libmysql.dll to hmailserver's bin folder.

User avatar
LVTS
New user
New user
Posts: 27
Joined: 2019-05-30 11:44
Location: England
Contact:

Re: HMailserver - Move Database

Post by LVTS » 2020-05-21 19:12

Hi there,

Thank you for your reply. I have downloaded the ZIP install for mySQL and found the file. I put the file into the bin folder but I am still getting the same message.

Many Thanks.

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

Re: HMailserver - Move Database

Post by Dravion » 2020-05-21 21:34

You need the 32-Bit variant of libmysql.dll v5.7.30
and you need MySQL 8.x to allow legacy Connection.

User avatar
LVTS
New user
New user
Posts: 27
Joined: 2019-05-30 11:44
Location: England
Contact:

Re: HMailserver - Move Database

Post by LVTS » 2020-05-21 22:35

According to phpMyAdmin I am using Server version: 8.0.20 - MySQL Community Server - GPL.

I don't know if I am looking in the wrong place but I can't find a 32bit version of MySQL Community Server 8.0.20 on the website.

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

Re: HMailserver - Move Database

Post by mattg » 2020-05-22 01:05

I think (not certain) that the earlier version of MySQL ZIPs for 32 bit contain a version of the dll that works with the higher version MySQL

Or you can install the 32 MSI of MySQL, that creates all of the file

Some of us are also using 64 bit versions of hMailserver, but these are ALPHA versions really
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Virinum
Normal user
Normal user
Posts: 137
Joined: 2018-11-23 14:42
Location: Germany

Re: HMailserver - Move Database

Post by Virinum » 2020-05-22 02:29


User avatar
LVTS
New user
New user
Posts: 27
Joined: 2019-05-30 11:44
Location: England
Contact:

Re: HMailserver - Move Database

Post by LVTS » 2020-05-22 07:59

Thanks for your reply. I downloaded the file and that error went away but we seem to have a big problem now.... I am getting this error:

Starting task...
Please wait while updating database settings...
Settings updated.
Restarting server...
Database version could not be detected.

And now no users are able to login to the server! Upon futher looking I can see that no files were transfered to the SQL database, it is empty. Futhermore I can no longer log-in to the local administration program, I am receiving this message:
hmail1.PNG
I have run the dbupdater.exe file but I immediatley receive this error:
hmail2.PNG
The Hmailserver error log was updated with the following new errors:

Code: Select all

"ERROR"	14428	"2020-05-22 06:56:41.935"	"Severity: 2 (High), Code: HM4208, Source: ExceptionHandler::Run, Description: An error occured while executing 'Task-AsynchronousTask'"
"ERROR"	14428	"2020-05-22 06:56:42.352"	"Severity: 1 (Critical), Code: HM5519, Source: StackLogger::Log, Description: An error has been detected. A mini dump has been written to C:\Program Files (x86)\hMailServer\Logs\minidump_2020-05-22 065641_{E11994F2-E89D-4C25-8D17-8450C0BA8262}.dmp"
"ERROR"	22884	"2020-05-22 06:57:32.476"	"Severity: 2 (High), Code: HM5033, Source: DALRecordset::Open, Description: MySQL: Table 'hmailserver.hm_dbversion' doesn't exist (Additional info: select * from hm_dbversion)"
"ERROR"	22884	"2020-05-22 06:57:32.478"	"Severity: 1 (Critical), Code: HM5010, Source: Application::OnDatabaseConnected, Description: Database version could not be detected."
"ERROR"	22884	"2020-05-22 06:57:49.388"	"Severity: 2 (High), Code: HM5033, Source: DALRecordset::Open, Description: MySQL: Table 'hmailserver.hm_dbversion' doesn't exist (Additional info: select * from hm_dbversion)"
"ERROR"	22884	"2020-05-22 06:57:49.389"	"Severity: 1 (Critical), Code: HM5010, Source: Application::OnDatabaseConnected, Description: Database version could not be detected."
"ERROR"	22884	"2020-05-22 06:59:43.479"	"Severity: 2 (High), Code: HM5033, Source: DALRecordset::Open, Description: MySQL: Table 'hmailserver.hm_dbversion' doesn't exist (Additional info: select * from hm_dbversion)"
"ERROR"	22884	"2020-05-22 06:59:43.480"	"Severity: 1 (Critical), Code: HM5010, Source: Application::OnDatabaseConnected, Description: Database version could not be detected."
"ERROR"	8620	"2020-05-22 07:01:13.434"	"Severity: 2 (High), Code: HM5033, Source: DALRecordset::Open, Description: MySQL: Table 'hmailserver.hm_dbversion' doesn't exist (Additional info: select * from hm_dbversion)"
"ERROR"	8620	"2020-05-22 07:01:13.435"	"Severity: 1 (Critical), Code: HM5010, Source: Application::OnDatabaseConnected, Description: Database version could not be detected."
"ERROR"	10752	"2020-05-22 07:01:39.627"	"Severity: 2 (High), Code: HM5033, Source: DALRecordset::Open, Description: MySQL: Table 'hmailserver.hm_dbversion' doesn't exist (Additional info: select * from hm_dbversion)"
"ERROR"	10752	"2020-05-22 07:01:39.635"	"Severity: 2 (High), Code: HM5033, Source: DALRecordset::Open, Description: MySQL: Table 'hmailserver.hm_dbversion' doesn't exist (Additional info: select * from hm_dbversion)"
"ERROR"	10752	"2020-05-22 07:04:07.461"	"Severity: 2 (High), Code: HM5033, Source: DALRecordset::Open, Description: MySQL: Table 'hmailserver.hm_dbversion' doesn't exist (Additional info: select * from hm_dbversion)"
"ERROR"	10752	"2020-05-22 07:04:07.470"	"Severity: 2 (High), Code: HM5033, Source: DALRecordset::Open, Description: MySQL: Table 'hmailserver.hm_dbversion' doesn't exist (Additional info: select * from hm_dbversion)"
I am just able to go back to whatever database it was using before?

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

Re: HMailserver - Move Database

Post by mattg » 2020-05-22 08:43

LVTS wrote:
2020-05-22 07:59
I am just able to go back to whatever database it was using before?
Change your hmailserver.ini settings back to what it was...

Did you back that up?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
LVTS
New user
New user
Posts: 27
Joined: 2019-05-30 11:44
Location: England
Contact:

Re: HMailserver - Move Database

Post by LVTS » 2020-05-22 08:50

Sadly no I did not back this up. Only the data folder.

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

Re: HMailserver - Move Database

Post by mattg » 2020-05-24 03:23

Was the original install a default install?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
LVTS
New user
New user
Posts: 27
Joined: 2019-05-30 11:44
Location: England
Contact:

Re: HMailserver - Move Database

Post by LVTS » 2020-05-24 09:01

Yes it was just a default install.

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

Re: HMailserver - Move Database

Post by mattg » 2020-05-25 05:32

Using the same windows user, you could probably rename the hMailserver.ini that you have and then run the installer to create a new one

That should take you to the existing default database

Really not tested, so use at own risk
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
LVTS
New user
New user
Posts: 27
Joined: 2019-05-30 11:44
Location: England
Contact:

Re: HMailserver - Move Database

Post by LVTS » 2020-05-28 13:08

Hi there - sorry for the late reply. I have been busy and haven't checked the forum in a couple of days. I actually give up with my current database - I created a new one so I could get my mail server running quickly as me and many others needed email access.

Thanks

Post Reply