MySQL: Database initialization failed

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
hmailuser2010
New user
New user
Posts: 12
Joined: 2010-01-06 19:49

MySQL: Database initialization failed

Post by hmailuser2010 » 2010-01-13 19:14

Hi,
I've got probably just a stupid error, but don’t find it! My configuration:
- hmailserver is running with building DB
- want to switch to mySQL DB
- mySQL Server is running (5.024) / hmailserver catalogue exists, access is granted, I can connect from SQL Administrator
- I have placed libmySQL.dll in hmailserver BIN
But when running hmailserver Database Setup it ends up with:
Starting task...
Please wait while updating database settings...
Settings updated.
Restarting server...
Database initialization failed.


Any suggestion, what went wrong?

Frank

User avatar
sheffters
Senior user
Senior user
Posts: 453
Joined: 2009-07-01 20:46
Contact:

Re: MySQL: Database initialization failed

Post by sheffters » 2010-01-13 21:43

looks likes either the hms user desnt have the riht access rights to the database, or youve upgraded and not upgraded in the right order

S.

hmailuser2010
New user
New user
Posts: 12
Joined: 2010-01-06 19:49

Re: MySQL: Database initialization failed

Post by hmailuser2010 » 2010-01-14 17:38

@sheffters :
What do you mean be ugraded (do you mean mySQL or hMailserver)?
I've just installed hMailserver, no upgrades, I used a mySQL installation from a running application, just added a database / added a user / granted all access to the user!

BTW, this is not a 64bit system, every thing is 32 bit!

Is there any LOG to read error detail?

regards,
Frank

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

Re: MySQL: Database initialization failed

Post by mattg » 2010-01-15 01:57

When you connect via the SQL Administrator (which one btw?), are the hmailserver tables created? Is there any data in any of them?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

hmailuser2010
New user
New user
Posts: 12
Joined: 2010-01-06 19:49

Re: MySQL: Database initialization failed

Post by hmailuser2010 » 2010-01-18 14:40

I'm using Administrator 1.1.
When I connect to the hmail-DB, there are no tables created (probably due to the initialisation failure).
With mySQL Administrator I can create tables so access should not be the problem!

Any further suggestions?

Thanks,
Frank

BTW I just ckecked the LOG:

"ERROR" 3268 "2010-01-18 13:44:12.032" "Severity: 2 (High), Code: HM5033, Source: DALRecordset::Open, Description: MySQL: Table 'hmaildb.hm_dbversion' doesn't exist (Additional info: select * from hm_dbversion)"
?!

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

Re: MySQL: Database initialization failed

Post by mattg » 2010-01-18 14:52

hmailuser2010 wrote:Is there any LOG to read error detail?
There should be a MySQL log...

Can you just triple check the access levels given by your MySQL server to the user detailed in the hMailserver.ini
Please also confirm the password...
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

hmailuser2010
New user
New user
Posts: 12
Joined: 2010-01-06 19:49

Re: MySQL: Database initialization failed

Post by hmailuser2010 » 2010-01-18 15:32

I used now an existing database (from a conquest pacs) with a definitely working user!
The initialization procedure of hMailserver should overwrite the existing tables – but nothing happens, same error!
There should be another stupid error I don’t see!

The error log from mySQL does not read something!
At least with mySQL Administrator I see the user hmail during initialization process..

Frank

vto80
New user
New user
Posts: 2
Joined: 2010-03-04 11:38

Re: MySQL: Database initialization failed

Post by vto80 » 2010-03-04 12:11

Same problem here.
The setup is XP Pro SP2, Uniserver (Mysql5, Apache2 - installed as services by the local system account), and Hmailserver5 - just downloaded the latest stable version.
Created a hmail database and a hmailuser via phpmyadmin.
Connecting to localhost:3306, hmailuser, hmailpass, database: hmail.
Copied the mysql dll file to hmailserver\bin.
And i keep getting the same error as the OP, on step 6/7 in the database setup wizard.

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: MySQL: Database initialization failed

Post by ^DooM^ » 2010-03-04 12:19

As a Test, Can you install V4 stable release then upgrade to latest V5?
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

vto80
New user
New user
Posts: 2
Joined: 2010-03-04 11:38

Re: MySQL: Database initialization failed

Post by vto80 » 2010-03-04 12:36

Will do, and post results. Can't do it right now unfortunately.
V4 had it's own mysql database as default. Won't it cause a conflict with the uniserver one?

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: MySQL: Database initialization failed

Post by ^DooM^ » 2010-03-04 12:43

No it uses port 3307 by default to prevent conflicts. I'm also fairly sure the installer gives you an option of which DB to use although it's been a while since I installed V4.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

Post Reply