Re-installing Hmail - no prompt to create internal 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
entropicsinkhole
Normal user
Normal user
Posts: 119
Joined: 2007-05-28 21:10

Re-installing Hmail - no prompt to create internal mysql

Post by entropicsinkhole » 2009-04-22 01:00

I'm reinstalling hmailserver (5.1) on a server that had it previously installed and removed. The SQL service was likewise removed. Now when I go to install hmailserver, it does not give me a prompt to install the MySQL database, so the database is not created. How do I either force the builtin database to install or redirect it to a mysql database in xampp?

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

Re: Re-installing Hmail - no prompt to create internal mysql

Post by ^DooM^ » 2009-04-22 01:05

You should be alble to run the database updater from the utils directory to choose which database to use.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

entropicsinkhole
Normal user
Normal user
Posts: 119
Joined: 2007-05-28 21:10

Re: Re-installing Hmail - no prompt to create internal mysql

Post by entropicsinkhole » 2009-04-22 01:05

Did that and it says it can't connect to it... specifically: "can't connect to MySQL Server on 127.0.0.1"

I'm wondering whether it's a password issue --> it uses 'server authentication' -- what password/username should I be using here? (I've tried the administrator password for hmailserver and the hmailserver.ini file decrypted with blowfish--> but there is no username given so i tried both blank and root)

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

Re: Re-installing Hmail - no prompt to create internal mysql

Post by ^DooM^ » 2009-04-22 01:15

You need to make sure the SQL server's user account your are trying to access has the correct permissions from a local or network connection depending on where you are running the database updater from.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

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

Re: Re-installing Hmail - no prompt to create internal mysql

Post by ^DooM^ » 2009-04-22 01:17

Ok don't edit posts when i am answering it :)

So you're local that's cool. The password is in the hMailServer.ini file but it is encrypted. You need to unencrypt the SQL password with the hMailServer/Addons/Utilities/DecryptBlowfish.vbs file
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

entropicsinkhole
Normal user
Normal user
Posts: 119
Joined: 2007-05-28 21:10

Re: Re-installing Hmail - no prompt to create internal mysql

Post by entropicsinkhole » 2009-04-22 01:23

I did that already, but it didn't work. Here's my hmailserver.ini file below. Not sure what username to use, since the one below is blank. I tried both blank and root to no success. (note the xxxxx is just a replacement for the real encrypted password)

[Directories]
ProgramFolder=D:\hMailServer
DatabaseFolder=D:\hMailServer\Database
DataFolder=D:\hMailServer\Data
LogFolder=D:\hMailServer\Logs
TempFolder=D:\hMailServer\Temp
EventFolder=D:\hMailServer\Events
[GUILanguages]
ValidLanguages=english,swedish
[Database]
Type=MSSQLCE
Username=
Password=xxxxxxxx
PasswordEncryption=1
Port=0
Server=
Database=hMailServer
Internal=1
[Security]
AdministratorPassword=xxxxxxx

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

Re: Re-installing Hmail - no prompt to create internal mysql

Post by ^DooM^ » 2009-04-22 01:24

It is root and remember that the local MySQL that hMailserver installs is on port 3307.

That INI file is pointing to MSSQLCE???
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

entropicsinkhole
Normal user
Normal user
Posts: 119
Joined: 2007-05-28 21:10

Re: Re-installing Hmail - no prompt to create internal mysql

Post by entropicsinkhole » 2009-04-22 01:36

Yeah, I don't know why it's pointed at MSSQLCE --> it generated itself (I didn't get a prompt asking me where to install the database during install, remember). I know on my old mailserver it was pointed at just MySql

One thing I forgot to mention is that the updater was asking for a libmysql.dll before it would even let me run the utility. I copied the one off my old mail server into the Bin folder as it requested. Not sure if that makes a difference.

Anyway, same error. When I'm running the updater, should I be using the Database entry already filled in in the hmailserver.ini file (ie. hMailServer)? Should I be filling in the other blanks (ie. port 3307, username, etc)? Or does the updater automatically fill this in? (I've actually tried it both filling in the hmailserver.ini file and not and it doesn't make a difference to the error)

Is there something else that needs to be installed maybe?

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

Re: Re-installing Hmail - no prompt to create internal mysql

Post by ^DooM^ » 2009-04-22 01:39

Do you have this dll libmysql.dll ? If not you will need it to connect to MySQL with V5. V5 does not ship with MySQL any longer due to it being closed source .
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

entropicsinkhole
Normal user
Normal user
Posts: 119
Joined: 2007-05-28 21:10

Re: Re-installing Hmail - no prompt to create internal mysql

Post by entropicsinkhole » 2009-04-22 02:02

That was it all along.... Originally I installed v. 4.2 which had the built-in SQL. So I just reinstalled the v. 4 one, then upgraded it to version 5. So far no problems :)

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

Re: Re-installing Hmail - no prompt to create internal mysql

Post by ^DooM^ » 2009-04-22 02:11

Awesome. Perhaps Martin should add a note about this in the docs :)
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Re-installing Hmail - no prompt to create internal mysql

Post by martin » 2009-04-22 18:00

I've read the thread but it's confusing. I don't know which part I should document. ;-)

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

Re: Re-installing Hmail - no prompt to create internal mysql

Post by ^DooM^ » 2009-04-22 18:08

If users want to use MySQL with V5 and they have not previously installed V4 of hMail they will need to include the libmysql.dll before hMail will be able to access MySQL?
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Re-installing Hmail - no prompt to create internal mysql

Post by martin » 2009-04-23 19:22

If libmysql.dll is missing, and you try to create MySQL database, you will get an error message stating that libmysql.dll cannot be found. The error message will tell you what to do:
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: <path-where-hMailServer-is-looking>
The error message he got, "can't connect to MySQL Server on 127.0.0.1" is created by libmysql.dll. Since it is libmysql.dll which actually composes this text, libmysql.dll must have been there and hMailServer has been able to use it. The problem is that the MySQL service doesn't appear to have been running though.

I will fix it so that the following error message is shown if you install hMailServer 4.x and use the internal MySQL, uninstall hMailServer (and MySQL) and then install hMailServer 5:
hMailServer 5 and later does not include MySQL. hMailServer 5 can still
use MySQL as backend though, assuming it is already installed on the system.

You have configured hMailServer 4 to use the bundled MySQL installation. However
hMailServer 4 with MySQL appears to have been uninstalled prior to running this
hMailServer 5 installation. Hence, the MySQL installation hMailServer needs is
no longer available.

To solve this problem, reinstall the same hMailServer 4 version as before and then
upgrade to version 5 without first uninstalling version 4.

As an alternative, you can cancel this installation, delete the entire hMailServer
directory and then run this installation program again. Using this method, your configuration
and email messages will be lost.

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

Re: Re-installing Hmail - no prompt to create internal mysql

Post by ^DooM^ » 2009-04-24 02:48

I see so an old version that was not compatible was left behind?
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Re-installing Hmail - no prompt to create internal mysql

Post by martin » 2009-04-24 20:41

No, as the error message says:
However hMailServer 4 with MySQL appears to have been uninstalled prior to running this hMailServer 5 installation. Hence, the MySQL installation hMailServer needs is no longer available.
So you'll get this message if you uninstall hMailserver/Internal MySQL and try to upgrade to hMailServer 5. This won't work since the MySQL installation hMailServer is configured to use is no longer available.

If you upgrade to hMailServer 5 and the MySQL installation is too old, you'll get an error message saying that..

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

Re: Re-installing Hmail - no prompt to create internal mysql

Post by ^DooM^ » 2009-04-24 21:23

:oops: ok, i see now, thanks, been a long old week :D
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

Post Reply