Solved

Cannot connect remotely to MySQL database

Posted on 2004-09-07
10
377 Views
Last Modified: 2012-05-05
OK on to the next hurdle.  I have been wrestling with this for hours.  I have installed MySQL 4.0 on Windows Server 2003.  I have created a user and granted that user remote permissions to for the SQL server.  I am now trying to connect to the MySQL server from MySQL Control Center.  I cannot connect.  It constantly tells me "Cannot connect to MySQL Server on <IP Address> (10060).  I set-up the account to connect as
user@IP Address.

The MySQL server is on the same Web server as the Website but I do not think that should matter from what I have read.  I have an extra IP and I configured to Bind Address to that IP.  The service starts fine on the Server and I am able to see the two databases (test and MySQL) when logged in as the root in the INI file.

I am wondering if the 3306 port is blocked and how I can unblock it if that is the problem.  If anyone knows the answer please give me a shout.

Rob

0
Comment
Question by:tconsult
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
10 Comments
 
LVL 26

Expert Comment

by:Umesh
ID: 12004262

Check whether mysql is running, if it is, then login using root (any user who has got full privileges) ..and run this sql command

FLUSH PRIVILEGES;

if mysql server is not running then yopu must start mysql server & check whether it connects..



0
 

Author Comment

by:tconsult
ID: 12006320
THanks

Tried that.  I want to login from MySQL Control Center.  To do that, I need a user that has been granted remote access privileges correct?  In any event, I tried root and it still does not work.  I also looked at MySQL in the Services on the server and it is running.   I have databind in the ini file set to one of the IP addresses on the machine.  I also have tried it with my firewall off.

Not sure what else to try.

Rob
0
 

Author Comment

by:tconsult
ID: 12006737
OK it appears I made some progress.  I am able to lconnect to the mySQL server through the ASP code.  It recognizes the user.  I just cannot get the MySQL COntrol Center to login with the exact same user, password, and IP address.  It constantly says it cannot connect.

Thanks.....Rob
0
Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

 
LVL 26

Expert Comment

by:Umesh
ID: 12006738
okie..

lets try this..

login using root (any user who has got full privileges)


C:\mysql\bin\>mysql --user=root -ppassword mysql

password-> put your password here..

( use this if you want to connect from the host itself..)
mysql> GRANT ALL PRIVILEGES ON test.* TO 'umesh'@'localhost'
    ->     IDENTIFIED BY 'some_pass';

( use this if you want to connect from remote mahcine.)
mysql> GRANT ALL PRIVILEGES ON test.* TO 'umesh'@'%'
    ->     IDENTIFIED BY 'some_pass';

mysql> FLUSH PRIVILEGES;

test -> test is the name of the database
umesh -> name of the user
mysql> mysql command prompt..

then try to connect from MySQL Control Center


Hope this helps!
0
 

Author Comment

by:tconsult
ID: 12007608
Nope.  Does not work.  Same thing.  I am not convinced that the problem is not with Port 3306 on the server because from my desktop I can connect to a different MySQL database.  Oddly enough, I cannot connect to that database from the server.  I get the same error.  

It may be that port 3306 is not allowing any traffic through it and I have no idea how to unblock that port.

Thanks....Rob
0
 
LVL 2

Accepted Solution

by:
montasirma earned 50 total points
ID: 12013103
It seems that the port is not open for remote connection. Do you have any firewall installed on either the Control Center or the Windows Server? If so, you have to create a rule that allows trafic to pass through the port 3306. Also check if you have IP Packet Filtering enabled on the server.
0
 

Author Comment

by:tconsult
ID: 12016975
Here is what the problem was.  Thanks to everyone for all your help above because I did learn many things from it.  BUT, our issue was actually a server config issue.  We just got this dedicated machine (Windows Server 2003 Web Edition).  The host handed it over to us with all ports BLOCKED minus 21 and 80.  We had to go in to the IP filtering and look at all the filtering rules that were set and uncheck the box next to "block all".  

Thanks again to all who helped.

Rob
0
 
LVL 26

Expert Comment

by:Umesh
ID: 12017615
So finally u got success..
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Incorrect definition of table mysql.proc 7 108
database connection error mysql stops 7 82
restriction of entering a a page 5 44
Dynamic Table mySQL stored procedure 5 62
More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question