View previous topic :: View next topic |
Author |
Message |
zeky Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/188434724542aafdcdf0091.jpg)
Joined: 24 Feb 2003 Posts: 470 Location: Vukojebina, Europe
|
Posted: Tue Jan 27, 2004 10:54 am Post subject: remote connect to MySQL server... [SOLVED] |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
MrPyro Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 14 Aug 2003 Posts: 121 Location: Sheffield, England
|
Posted: Tue Jan 27, 2004 11:29 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
zeky Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/188434724542aafdcdf0091.jpg)
Joined: 24 Feb 2003 Posts: 470 Location: Vukojebina, Europe
|
Posted: Tue Jan 27, 2004 2:16 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
reinier n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/17123877144019c4f21dccf.gif)
Joined: 30 Jan 2004 Posts: 12 Location: Netherlands
|
Posted: Tue Feb 03, 2004 11:43 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
gdoubleu Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 07 May 2003 Posts: 80
|
Posted: Sat Nov 06, 2004 6:31 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|