Error establishing a database connection

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
jung
Posts: 6
Joined: Tue Nov 01, 2016 11:49 am

Error establishing a database connection

Post by jung »

Good day Hesk Guru,

I'm getting "Error establishing a database connection" during first step of installation after typing in "http://localhost/helpdesk/install/install.php"

This is what i've done:
1. Created mysql database (hesk_db) and username (heskadmin) then granted the user permission
2. Assigned the 777 permission to the ff. files:
a. hesk_settings.inc.php
b. "attachments folders.
3. Edited the "hesk_settings.inc.php" by entering the correct database name, username and password based on mysql setup.
4. Open port 3306 in iptables
5. disabled SELinux referencing

my setup:
Centos 6.5, php 5.6.18, mysql5.7.16, hesk268

Any help is much appreciated.

Thank you so much.
Jung
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Error establishing a database connection

Post by Klemen »

What is the *exact* error message Hesk gives when you try to continue to Step 4 of install.php (copy/paste the entire red error square)?

P.s.: make sure you follow installation instructions to the point; there is no mention of manually editing the hesk_settings.inc.php file in the official instructions.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
jung
Posts: 6
Joined: Tue Nov 01, 2016 11:49 am

Re: Error establishing a database connection

Post by jung »

hi Klemen,

Actually the exact entire error that i'm seeing is "Error establishing a database connection". The reason why i edited the hesk_settings.inc.php is to try to fixed the above error but to no avail.

FYI: Trying to setup hesk on my local server.

Thanks Klemen. Looking forward to use hesk as our helpdesk to support 65branches and tons of users.

JunG.
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Error establishing a database connection

Post by Klemen »

The "Error establishing a database connection" is not an error Hesk generates, that's why I was asking.

Are you able to connect to MySQL using any other PHP script?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
jung
Posts: 6
Joined: Tue Nov 01, 2016 11:49 am

Re: Error establishing a database connection

Post by jung »

Hi Klemen,
Connection to mysql is working fine. i'm able to connect using wordpress, nagios, owncloud and racktables. Anyway, can you send me tutorial link on how to install and configure hesk locally into my centos server?

Thank you so much for your time and patience. i just really need to make it work.

JunG
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Error establishing a database connection

Post by Klemen »

There are no special tutorials for CentOS.

In 99.9% of cases it installs without a hiccup on any server with PHP/MySQL support just by following steps in the docs.

If you have other PHP scripts running on the very same server, try using the exact MySQL details you use for them (tables will not clash as Hesk gives a unique table prefix).
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Error establishing a database connection

Post by Klemen »

P.s.: Hesk doesn't connect to MySQL until STEP 3 of install.php is submitted... can you make a screenshot of your error?

It seems to me you are seeing a Wordpress error, not a Hesk error.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
jung
Posts: 6
Joined: Tue Nov 01, 2016 11:49 am

Re: Error establishing a database connection

Post by jung »

Hi Klemen,

Thank you so much for the swift reply. Here's what i need to do. i will do a clean LAMP installation then try to install again hesk.
you can close now this conversation. i will create a new post just in case i encounter problem. again thank you so much.
Post Reply