Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Lite 7

 AfterLogic Forum : AfterLogic WebMail Lite 7
Subject Topic: SQLSTATE[HY000] [2002] No connection ... Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
alexbromo
Newbie
Newbie


Joined: 14 July 2015
Location: Italy
Online Status: Offline
Posts: 25
Posted: 14 July 2015 at 12:28am | IP Logged Quote alexbromo

Hi,
I installed PHP WebMail Lite on our Windows 2008 Server R2, using MySQL database.
I have a problem to setup the database setup: "in INSTALL -> Specify Database Settings -> Create" i get the error "SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it."
I specified both "host = 127.0.0.1" and "host = <server IP address>" but with no luck.
:(
ALex.
Back to Top View alexbromo's Profile Search for other posts by alexbromo
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 14 July 2015 at 12:35am | IP Logged Quote Igor

The message usually means the connection is blocked by firewall or some other protective software. Typically, MySQL uses port 3306, make sure the connection over that port is allowed.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
alexbromo
Newbie
Newbie


Joined: 14 July 2015
Location: Italy
Online Status: Offline
Posts: 25
Posted: 14 July 2015 at 12:52am | IP Logged Quote alexbromo

Igor,
Thank you for prompt reply.
I tried to open 3306 port on host machine's firewall but this does not resolve the problem.
Furthermore both webserver (IIS with PHP) and MySQL server runs on the same host, so i think the server's internal firewall is not involved.
Is there a simple method to verify MySQL is correctly installed and running on server ?
ALex.
Back to Top View alexbromo's Profile Search for other posts by alexbromo
 
alexbromo
Newbie
Newbie


Joined: 14 July 2015
Location: Italy
Online Status: Offline
Posts: 25
Posted: 14 July 2015 at 12:58am | IP Logged Quote alexbromo

Below the content of logfile in ./data/log:

----------------------
[07:48:13.85][e38018e3] [POST(9)][ip:192.168.20.112] /install/index.php?post
[07:48:13.85][e38018e3] POST > [state, chSqlType, txtSqlLogin, txtSqlPassword, txtSqlName, txtSqlSrc, test_btn, prefixString, chNotCreate]
[07:48:13.85][e38018e3]
[07:48:13.85][e38018e3] SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.

[07:48:13.85][e38018e3] #0 C:\inetpub\wwwroot\afterlogic_webmail\libraries\afterlogic\common\db\pdo\mysql.php(170): PDO->__construct('mysql:dbname=we...', 'root', 'password', Array)
#1 C:\inetpub\wwwroot\afterlogic_webmail\install\steps\db.php(64): CDbPdoMySql->Connect()
#2 C:\inetpub\wwwroot\afterlogic_webmail\install\installer.php(179): CDbStep->DoPost()
#3 C:\inetpub\wwwroot\afterlogic_webmail\install\installer.php(84): CInstaller->Post()
#4 C:\inetpub\wwwroot\afterlogic_webmail\install\index.php(16): CInstaller->Run()
#5 {main}
----------------------
ALex.
Back to Top View alexbromo's Profile Search for other posts by alexbromo
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 14 July 2015 at 1:03am | IP Logged Quote Igor

You could try running mysql command-line tool which is a part of MySQL package. If the server is running, you should get a response with something like:

Code:
Welcome to the MySQL monitor.  Commands end with ; or \g.
...

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>


And if the server is down, error will be thrown and the window will probably close.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
alexbromo
Newbie
Newbie


Joined: 14 July 2015
Location: Italy
Online Status: Offline
Posts: 25
Posted: 13 August 2015 at 1:11am | IP Logged Quote alexbromo

Thanks Igor, i solved the problem managing firewall setup. :)

ALex.
Back to Top View alexbromo's Profile Search for other posts by alexbromo
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide