Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Application and Web Development > PHP

Reply
 
LinkBack Thread Tools Display Modes
Old 04-27-2004, 06:20 PM   #1 (permalink)
infinite_root
Registered User
 
infinite_root's Avatar
 
Join Date: Apr 2004
Posts: 26
infinite_root is on a distinguished road
Access denied for user: '@192.168.0.71' (Using password: NO)

I tried to connect to my mysql server from a win client and the following error appeared:

c:\mysql -h 192.168.0.2 -u sqluser -p

Where:
192.168.0.2 MY MYSQL SERVER
192.168.0.71 MY CLIENT PC

/var/log/mysql.err

61 Quit
62 Connect sqluser@localhost on vmail
62 Query SELECT quota FROM users WHERE id ='sqluserl' AND mbox_host='domain.com'
62 Query SELECT CONCAT(home, "/Maildir/") FROM users WHERE id='sqluser' AND mbox_host='domain.com'
62 Quit
040427 15:43:52 63 Connect Access denied for user: '@192.168.0.71' (Using password: NO)
040427 15:43:55 64 Connect Access denied for user: '@192.168.0.71' (Using password: NO)
040427 15:44:00 65 Connect Access denied for user: '@192.168.0.71' (Using password: NO)
040427 15:44:07 66 Connect Access denied for user: '@192.168.0.71' (Using password: NO)
040427 15:44:14 67 Connect Access denied for user: '@192.168.0.71' (Using password: NO)

I have provided the following privileges:

GRANT ALL PRIVILIGES ON mysqldb.* TO 'sqluser'@'localhost' IDENTIFIED BY 'passwd'

Also I tried something like this:
GRANT ALL PRIVILIGES ON mysqldb.* TO 'sqluser'@'localhost' IDENTIFIED BY 'passwd WITH GRANT OPTION; GRANT ALL PRIVILEGES ON mysqldb.* TO sqluser@192.168.0.17 IDENTIFIED BY 'password' WITH GRANT OPTION; FLUSH PRIVILEGES;

How can I fix the problem?

Hope you can help me Iam stuck for many weeks now.

Thanks and more power.
infinite_root is offline   Reply With Quote
Old 04-27-2004, 06:54 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,475
sde is on a distinguished road
well, .. if you're not worried too much about security, .. then you can open it up by logging in as the mysql root on the server and typing this:
Code:
GRANT ALL PRIVILEGES ON *.* TO sqluser@'%' IDENTIFIED BY 'passwd'
your syntax to login from the windows client looks correct:
Code:
cd c:\mysql\bin
mysql -usqluser -h192.168.0.2 -p
password: passwd
that should do it.
__________________
Mike
sde is offline   Reply With Quote
Old 04-27-2004, 06:59 PM   #3 (permalink)
infinite_root
Registered User
 
infinite_root's Avatar
 
Join Date: Apr 2004
Posts: 26
infinite_root is on a distinguished road
Quote:
Originally posted by sde
well, .. if you're not worried too much about security, .. then you can open it up by logging in as the mysql root on the server and typing this:
Code:
GRANT ALL PRIVILEGES ON *.* TO sqluser@'%' IDENTIFIED BY 'passwd'
your syntax to login from the windows client looks correct:
Code:
cd c:\mysql\bin
mysql -usqluser -h192.168.0.2 -p
password: passwd
that should do it.
Thank you for you speedy reply. However, I intend to use mysql over the internet also. So, i probably use my external ip for that matter.

Hope youll reconsider my request.

Thanks and more power.
infinite_root is offline   Reply With Quote
Old 04-27-2004, 07:11 PM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,475
sde is on a distinguished road
ok .. well then why don't you give us a good example of your network.

as i see it, .. you have a server, and a windows client both behind a firewall?

even if this is so, then my first bit of code would allow any requests comming into the server to be accepted , so long as you hav the correct user and pass.

what you must consider is that if you are going in from outside your network, you will need to setup port forwarding on your router.

mysql runs on port 3306 i think .. so you will need to forward incoming requests from port 3306, to your internal ip of the server .. i think it is 192.168.0.2

now my second bit of code will work from anywhere, .. but yes, if you are outside your network, you will need to use your external ip.
__________________
Mike
sde is offline   Reply With Quote
Old 04-27-2004, 08:42 PM   #5 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
Hmm, this thread looks very familiar...
bdl is offline   Reply With Quote
Old 04-27-2004, 09:07 PM   #6 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,475
sde is on a distinguished road
huh?
q
__________________
Mike
sde is offline   Reply With Quote
Old 04-27-2004, 09:10 PM   #7 (permalink)
infinite_root
Registered User
 
infinite_root's Avatar
 
Join Date: Apr 2004
Posts: 26
infinite_root is on a distinguished road
Quote:
Originally posted by sde
[b]ok .. well then why don't you give us a good example of your network.

as i see it, .. you have a server, and a windows client both behind a firewall?
Yes, you're right my problem came from the firewall.

Thanks and more power.
infinite_root is offline   Reply With Quote
Old 04-27-2004, 10:34 PM   #8 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,696
redhead is on a distinguished road
Quote:
Originally posted by bdl
Hmm, this thread looks very familiar...
Yes indeed: http://www.linuxjunior.org/yabbse/in...;threadid=9104
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 04-27-2004, 11:18 PM   #9 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,475
sde is on a distinguished road
heh thanks redhead .. our very own code enwbie sherlock
__________________
Mike
sde is offline   Reply With Quote
Old 04-27-2004, 11:24 PM   #10 (permalink)
infinite_root
Registered User
 
infinite_root's Avatar
 
Join Date: Apr 2004
Posts: 26
infinite_root is on a distinguished road
Angry

Quote:
Originally posted by sde
heh thanks redhead .. our very own code enwbie sherlock
I am sorry Hope I didn't offended anyone for that matter.

Just looking for a forum that can address my problem more promptly.

Thanks and more power to you all.
infinite_root is offline   Reply With Quote
Old 04-28-2004, 05:09 AM   #11 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,475
sde is on a distinguished road
hey not at all .. that's what this site's here for.
__________________
Mike
sde is offline   Reply With Quote
Old 04-28-2004, 05:30 PM   #12 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
Ha! Thanks for the link redhead, I saw the same one on another site altogether...
bdl is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 10:40 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting