Install hMailserver with mysql on a different port

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
RogerK
New user
New user
Posts: 5
Joined: 2020-04-17 08:21

Install hMailserver with mysql on a different port

Post by RogerK » 2020-05-21 16:02

Apologies for this basic question, I have searched through discussions and documentation
for some time, but without success.

I need to install hMailserver with mySQL running on a different port from 3066 (for complex reasons)

The normal installation procedure fails at the point where a database connection is attempted

Is there a workaround for this. I would be happy to create the external database first if that helps/

Many thanks

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

Re: Install hMailserver with mysql on a different port

Post by Dravion » 2020-05-21 17:04

Change it after Installation:

In hMailServer.INI

[Database]
Port=1234

RogerK
New user
New user
Posts: 5
Joined: 2020-04-17 08:21

Re: Install hMailserver with mysql on a different port

Post by RogerK » 2020-05-21 17:25

Thanks a lot, Dravion, that has moved me on a little.

But now when I try to connect through the Admin console, there is an error
message - cannot find the hmailserver database - because this has not been
configured yet with its own password etc.

I need to make the port change earlier on somehow

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

Re: Install hMailserver with mysql on a different port

Post by mattg » 2020-05-21 17:53

If you have data back it up - select all options including compression

Then re-run the hamilserver installer with the .ini file changed
It SHOULD just install a blank database if hmailserver.ini also has correct credentials for MYSQL in it
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

RogerK
New user
New user
Posts: 5
Joined: 2020-04-17 08:21

Re: Install hMailserver with mysql on a different port

Post by RogerK » 2020-05-21 19:38

More progress, I started afresh, I think an earlier version of the MySQL installer may have confused
matters, so I deleted that too.

Now I go through the hMailer database screens ok,

Then Finalising Installation - -please wait whilst the setup performs post-installation
tasks.

Initialising hMailserver database ...

Bar progresses to about 60% complete, then the process hangs

Looking at mysql, I see the hMailserver database and a "tables" entry, but no tables created

There is no data in the tables that matters. I have another server with hMailserver running ok,
is it worth trying to populate the tables with the contents of this?

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

Re: Install hMailserver with mysql on a different port

Post by mattg » 2020-05-22 00:57

No you can't create the tables - hMailserver does that

Sounds like permissions issue on the remote MySQL database

If you want to see the sql and test the commands
./hMailserver/DBScripts/

but you should let hMailserver 'make' the tables for real
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Post Reply