egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[SOLVED] mysql connection

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
MUSUL
Voice


Joined: 26 Apr 2010
Posts: 5

PostPosted: Mon Apr 26, 2010 4:07 pm    Post subject: [SOLVED] mysql connection Reply with quote

Hello i have a big problem,

I try this:

Code:
set db(host) "myhost.com"
set db(id) "user"
set db(pass) "******"
set db(dbase) "bot"

package require mysqltcl

set db(conex) [::mysql::connect -host $db(host) -port "3306" -user $db(id) -password $db(pass) -db $db(dbase) ]


And i receive this ouput:

[19:54] ::mysql::connect/db server: Access denied for user 'user'@'208.*.*.*' (using password: YES)
while executing
"::mysql::connect -host $db(host) -port "3306" -user $db(id) -password $db(pass) "

Is trying to connect the the local ip (localhost i guess).

How can specify my own IP? All the time is taking 208.*.*.* as mysql IP, and i'm opening from "myhost.com".

Need some help. ty!


Last edited by MUSUL on Mon Apr 26, 2010 5:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Mon Apr 26, 2010 4:42 pm    Post subject: Reply with quote

Use the appropriate IP for the destination. The IP used by your mysql-library is in fact determined by the routing table of the system.

If you connect to myhost.com, which resolves to 208.aaa.bbb.ccc, then your connection will originate from whatever interface (and thus the IP bound to that interface) which has the shortest path to 208.aaa.bbb.ccc. If this is on the same host, that would be 208.aaa.bbb.ccc.

If you'd like the connection to originate from localhost (127.0.0.1), then you can only connect to that very same IP.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
MUSUL
Voice


Joined: 26 Apr 2010
Posts: 5

PostPosted: Mon Apr 26, 2010 5:00 pm    Post subject: Reply with quote

No, myhost.com is resolving with 84.*.*.*. 208.*.*.* is the IP from my private shell.

So, i wanna connect to myhost.com (external IP), and eggdrop is trying to connect to the shell's IP.
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Mon Apr 26, 2010 5:22 pm    Post subject: Reply with quote

Please don't confuse the IP-part of the access denied-message with where you are connecting to. The fact that it's stating 'user'@'208.aaa.bbb.ccc' means that the connection originated from 208.aaa.bbb.ccc, and that there was no matching user record on the mysql-server with the password you provided.

Most likely then, you are connecting to the correct database server, but failed to set up a valid user account with permissions to connect from your IP (208.aaa.bbb.ccc).
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
MUSUL
Voice


Joined: 26 Apr 2010
Posts: 5

PostPosted: Mon Apr 26, 2010 5:34 pm    Post subject: Reply with quote

Omg was using a local mysql account. Now i can Very Happy ty!

I thought that @ip was for the server :p
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber