473,377 Members | 1,153 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,377 software developers and data experts.

Cannot connect to Online Database from my PC

HELP ME!
I want to make sure that I can connect to the database server online from my PC (Remote MySql) .. what I did was:
- Set enabled to RemoteMySql at the hosting
- Use IP, Username, password of the database
- I set grant for all execution in hosting for the user (me)

And, this is the code:

[z{Redacted IP, User, and Password for member safety}]
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $con = mysql_connect("###.###.###.##","UserName","Password");
  3. if (!$con)
  4.   {
  5.   die('<strong>Failed to connect!</strong>'). mysql_error();
  6.   }
  7. //close the database
  8. mysql_close($con)
  9. ?>
But, report sends me this:
"Warning: mysql_connect(): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\[z{Redacted}]
\ol.php on line 2"

Please Help!
Dec 31 '13 #1
3 1227
Change Your name and password, then try to connect it.
Dec 31 '13 #2
Well, I have type my name (username) and password so carefully and I'm sure it's right which was mentioned in my incoming email from the hosting ... It still reports that again.

I connect it from wifi network. is it okay?
Dec 31 '13 #3
zmbd
5,501 Expert Mod 4TB
@Nazareth Nz

The error is trying to tell you that there is no connection or there was no response from the server.

What I would check:
1. "###.###.###.##" looks like it's missing something, mal-formed? Usually there are three digits for each and a port, no? ###.###.###.###:####
2. Are you sure MySQL running?
3. Is there any firewall that could be blocking your computer from accepting connections to MySQL
4. What port is MySQL listening on? Are you sure you are connecting to that port?

If phpMyAdmin came with the MySQL install, then it could be that it was configured to use the appropriately different port

@Badra100: If you are not going to post something useful, please do not post. If you'd read the OP and understood the error message you wouldn't be worrying Nazareth about user names and passwords.
Dec 31 '13 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Ashutosh | last post by:
Hi, I am having a problem connecting to mysql database. I am using PHP5.0 and mysql 4.1 I am using mysql_connect("servername","us­ername","password"); Everytime I execute the script the...
6
by: Jeff Sandler | last post by:
I have a database I created in mySQL. I've been entering data every day into the database using a Java application that I wrote. The database and the Java program are on the same Win 98 SE...
4
by: John Morgan | last post by:
I have Enterprise Manager on my local machine. For the last twelve months it has been connecting without problem to my online SQL Server database provided by my ISP. Three weeks ago the ISP...
0
by: RAM | last post by:
Hi, (Sorry for my English...) I have such problem: if I use Database Explorer in Visual Studio I will not be able to connect from my application to the database; when I don't use Database...
2
by: comp.lang.php | last post by:
when trying to use the mysql_real_escape_string() function, the following warning occurs: First of all, the user is not 'web' trying to connect to the database, secondly, what is...
2
by: Racerx | last post by:
Hi All: I use db2 v8 on AIX.. I could not connect to the database nor did any commands like activate get db cfg for database work.. checked the OS utilities but gave no possible clue.. ...
1
by: rubeel | last post by:
I cannot seem to connect to this Instance locally which was i able to in the past. I can connect to the instance from out side. The instance is running and the DBs in the instance are available and...
4
by: Gourk | last post by:
I'm fairly new to the whole MySQL thing, But not new to SQL. So doing most of this was fairly easy, but I have a hosting service with Godaddy.com, and Yes it supports MySQL 5.0 and is installed and...
0
by: binitarana | last post by:
I have a problem with .net application. We have an application created in VB.Net. It's a client server application. The database is SQL Server 2000. 5-6 clinet machine are accessing the server....
0
by: ramaswamynanda | last post by:
Hello, I am developing a windows application in Vb 2005 Express and Sql Server express I have created a database in sqlserver called "mydb" I want to connect the desktop VB application to this...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.