Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
remote connect to MySQL server... [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
zeky
Guru
Guru


Joined: 24 Feb 2003
Posts: 470
Location: Vukojebina, Europe

PostPosted: Tue Jan 27, 2004 10:54 am    Post subject: remote connect to MySQL server... [SOLVED] Reply with quote

Hello!

I'm going mad.... Been joking around with this prob for hours now, and i still can't figure it out.

On one box in LAN i have MySQL running, and i can access the database from localhost with no problems. The problem is when i'm trying to connect to this database from another box in LAN. Here is the example:

Code:
T:\>C:\mysql\bin\mysql.exe --host=gentoo -Ddbgentoo -u root -p
Enter password: ********
ERROR 1130: Host 'my-laptop.some.domain' is not allowed to connect to this MySQL
 server


I've read all the posts in forums but no luck. I really don't know what more to do? Howcome i cannot connect from remote??? I'm not running any firewalls and port 3306 is open.

HELP!
_________________
Beat your dick like it owes you money


Last edited by zeky on Tue Jan 27, 2004 2:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
MrPyro
Tux's lil' helper
Tux's lil' helper


Joined: 14 Aug 2003
Posts: 121
Location: Sheffield, England

PostPosted: Tue Jan 27, 2004 11:29 am    Post subject: Reply with quote

The error isn't in the networking. You are making the connection to the server perfectly well. The problem is that you have not configured your MySQL user table properly.

MySQL starts up by default allowing full access to any local user and pretty much zero access to any remote user. It also checks your hostname BEFORE it checks your username, so even if you have added root@% to the user table it still might screw up.

My advice

1) Make sure you have a user account root@% (% is a MySQL wildcard), with a password and full access to the database (with grants and everything)

2) Delete the users %@localhost and %@% from the user table
EDIT: the %@% might just be called @%

Hope this helps
_________________
Back off man, I'm a computer scientist
Back to top
View user's profile Send private message
zeky
Guru
Guru


Joined: 24 Feb 2003
Posts: 470
Location: Vukojebina, Europe

PostPosted: Tue Jan 27, 2004 2:16 pm    Post subject: Reply with quote

N/m i got it finnaly working, after sweating my ballz for a few hours...

hint: webmin IS good ;)

Peace
_________________
Beat your dick like it owes you money
Back to top
View user's profile Send private message
reinier
n00b
n00b


Joined: 30 Jan 2004
Posts: 12
Location: Netherlands

PostPosted: Tue Feb 03, 2004 11:43 am    Post subject: Reply with quote

I'm having a problem accessing phpMyAdmin (to work on LDAP entries remotely) from a remote client and I think it has something to do with my MySQL setup... according to the phpMyAdmin documentation (http://www.phpmyadmin.net/documentation/)

Code:

[2.6] I get an "Access denied for user: 'root@localhost' (Using password: YES)"-error when trying to access a MySQL-Server on a host which is port-forwarded for my localhost
When you are using a port on your localhost, which you redirect via port-forwarding to another host, MySQL is not resolving the localhost as expected.
Erik Wasser explains: The solution is: if your host is "localhost" MySQL (the commandline tool 'mysql' as well) always tries to use the socket connection for speeding up things. And that doesn't work in this configuration with port forwarding.
If you enter "127.0.0.1" as hostname, everything is right and MySQL uses the TCP connection.


I don't think I'm using port-forwarding, but I do get the same error message... When I look in webmin, it seems my MySQL user table is correct but when I try to alter any root entries I get connection errors and end up unmerge-ing and emerge-ing MySQL again to get things working. How exactly can I make a user account root@% ?.. and is that going to solve my problem?
Back to top
View user's profile Send private message
gdoubleu
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2003
Posts: 80

PostPosted: Sat Nov 06, 2004 6:31 pm    Post subject: Reply with quote

I was having this problem also. The culprit for me was the following line in /etc/mysql/my.cnf:
Code:
# keep secure by default!
bind-address    = 127.0.0.1

comment out that line and restart the mysql deamon to allow remote connections.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum