Solved

Cannot connect to MySQL server from anything but command line

Posted on 2003-11-25
10
693 Views
Last Modified: 2008-02-01
I have switched from one server running MySQL running 3.x to a server running 4.0.16 and cannot connect to it with anything except the command line through telnet. I keep getting "access denied" messages. Even if I set up another user with all permissions and try to connect with that user, it does not work. I have tried using apps to connect to it from my PC like Access and Mascon. I also have install apps like phpMyAdmin and a shopping cart on the server and set them to try "localhost" and the IP address but they cannot reach it either.

Help!

MJL
0
Comment
Question by:mjinxed
  • 5
  • 4
10 Comments
 
LVL 17

Expert Comment

by:Squeebee
Comment Utility
What specific error message do you get?

When you set-up a user with all permissions, did you also allow access from all hosts?
0
 

Author Comment

by:mjinxed
Comment Utility
If I try to connect with Mascon, I get the error "Could not connect using: user@ip" where user@ip are the user name I am trying to connect with and the IP address of the server I am trying to connect to.

With my shopping cart, I get the following:

DBI connect('host=localhost;database=ccp51','mikel',...) failed: Access denied for user: 'user@localhost' (Using password: YES) at /library/common/database.pl line 366

where "user" is the name of the user I am trying to connect with.

Yes, my user is set up in webmin under database permissions like so:

DATABASE - any USER - username HOSTS - any PERMISSIONS - all

MJL
0
 
LVL 17

Expert Comment

by:Squeebee
Comment Utility
If I saw that error message I would say that either my password is incorrect or my host permission is wrong. That or anonymous users are wreaking havoc on your permission checking... What do the contents of your user table look like?
0
 
LVL 1

Expert Comment

by:Vihmapuu
Comment Utility
Did you try GRANT command from command line?
See MySQL documentation for more information.
To allow access from any IP address, you would have to do like this:
GRANT ALL PRIVILEGES ON *.* TO user@"%" IDENTIFIED BY "password";
Please note "%" in double quotes that makes MySQL accept connections from any IP.
0
 

Author Comment

by:mjinxed
Comment Utility
mysql> grant all privilages on *.* to ccpsql@"%" identified by "ITypedMyPasswordInsideQuotes";
ERROR 1064: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'privilages on *.* to ccpsql@"%" identified by "ITypedMyPasswordInsideQuotes"' at li

MJL
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 17

Expert Comment

by:Squeebee
Comment Utility
grant all on *.* to 'ccpsql'@'%' identified by 'ITypedMyPasswordInsideQuotes';
0
 

Author Comment

by:mjinxed
Comment Utility
mysql> grant all on *.* to 'ccpsql'@'%' identified by 'ITypedMyPasswordInsideQuotes';
Query OK, 0 rows affected (0.03 sec)

When I try to connect to the server via Mascon using the ip address on port 3306, I get the following error:

Error: Could not connect using: ccpsql@my.ip.address.here

Am I losing my mind here? It was not this difficult last time I set this up....

MJL
0
 

Author Comment

by:mjinxed
Comment Utility
The server seems to work fine with anything on it that uses 'localhost' but anything that needs to connect remotely using the IP address or the domain name does not work.

MJL
0
 
LVL 17

Accepted Solution

by:
Squeebee earned 100 total points
Comment Utility
Is a firewall blocking the connection?
0
 

Author Comment

by:mjinxed
Comment Utility
I don't remember the solutiojn but I remember you helped me find it so thank you!

MJL
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now