Jump to content

[Solved] Message: mysqli::real_connect(): (HY000/2003): Can't connect to MySQL server on 'johnny.heliohost.org' (111 "Connection refused")


sanju757

Recommended Posts

Hi I am trying to connect to MySQL database remotely. I have followed all the steps but still I get Connection refused error. 

 

1. Created Database in cpanel.

2. Created User and added it to the database. 

3. Added host from which I am connecting to "Remote MySQL" Tab. 

4. Tried to connect to Database using host: 'johnny.heliohost.org' username, password, dbname from PHP. 

5. Tried connecting to database after adding '%' in Remote MySQL tab. Still the issue persists.

 

 

Is there any other configurations for connecting to mysql remotely ?

 

Note: I am trying to connect outside of Helionet cpanel. from another hosting.

Edited by sanju757
Link to comment
Share on other sites

You've done all the steps right. Depending on the host though, there are a few that block external databases on their end, so it might actually be that your other host doesn't allow it.

 

What happens if you try to remotely access your database from something like your home computer?

  • Like 1
Link to comment
Share on other sites

Ahh. I got it. May be the other hosting is not allowing the remote MySQL connections. It works perfectly fine in all the hosts of Helionet CPanel. 

 

A final query. What are the thresholds of Helionet Hosting. 

 

1. Max connections per hour (MySQL)

2. Max Concurrent requests. 

3. Any limitations for web page requests? I am the only one using it. What if 5-10 people use it? Does the threshold is that low? 

4. I see website goes down frequently with 500 Error and be back in couple of minutes or 5. Is it because of load on the johnny server or is it designed like this. 

Edited by sanju757
Link to comment
Share on other sites

1. Max connections per hour (MySQL)

Unlimited.

 

2. Max Concurrent requests.

Johnny=4, Ricky=4, Tommy=unlimited. We may limit the Tommy mysql connections if someone starts to abuse it though. If each mysql connection is only open for a few milliseconds and then closed properly the limit of 4 can usually handle a few dozen users at the same time without errors.

 

3. Any limitations for web page requests? I am the only one using it. What if 5-10 people use it? Does the threshold is that low?

We offer unlimited page requests, and unlimited bandwidth. We do monitor memory usage and cpu usage though. You can monitor your usage on the cpanel button labeled Account Load. If you get to 100 you have a high chance of being suspended.

 

4. I see website goes down frequently with 500 Error and be back in couple of minutes or 5. Is it because of load on the johnny server or is it designed like this.

Johnny is an experimental server. This means that he is only suitable for experimenting. If you want speed and uptime we recommend using the production server Tommy.
  • Like 1
Link to comment
Share on other sites

I changed the password of sanju757_app to test it, and can confirm that remote mysql is working on your account

 

[/home/krydos]# mysql --host=johnny.heliohost.org --user=sanju757_app -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 32143
Server version: 5.7.31 MySQL Community Server (GPL)
 
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
 
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| sanju757_app       |
+--------------------+
2 rows in set (1.02 sec)
 
mysql> use sanju757_app;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...