mjinxed
asked on
Cannot connect to MySQL server from anything but command line
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
Help!
MJL
ASKER
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;da tabase=ccp 51','mikel ',...) failed: Access denied for user: 'user@localhost' (Using password: YES) at /library/common/database.p l 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
With my shopping cart, I get the following:
DBI connect('host=localhost;da
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
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?
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.
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.
ASKER
mysql> grant all privilages on *.* to ccpsql@"%" identified by "ITypedMyPasswordInsideQuo tes";
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 "ITypedMyPasswordInsideQuo tes"' at li
MJL
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 "ITypedMyPasswordInsideQuo
MJL
grant all on *.* to 'ccpsql'@'%' identified by 'ITypedMyPasswordInsideQuo tes';
ASKER
mysql> grant all on *.* to 'ccpsql'@'%' identified by 'ITypedMyPasswordInsideQuo tes';
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
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
ASKER
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
MJL
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I don't remember the solutiojn but I remember you helped me find it so thank you!
MJL
MJL
When you set-up a user with all permissions, did you also allow access from all hosts?