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 

Mysqltcl [Can't connect to local MySQL...]

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


Joined: 16 Jun 2007
Posts: 4

PostPosted: Sat Jun 16, 2007 5:09 pm    Post subject: Mysqltcl [Can't connect to local MySQL...] Reply with quote

So I did (debian):
apt-get install mysqtcl

Was happy finally having mysqltcl. Though it didnt last long. Once I try to connect to mysql i get:

Tcl error [sdt:chat]: mysqlconnect/db server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

though the problem is have apache running with a site using mysql and it connect without a problem to mysql, BUT through socket:
/opt/lampp/var/mysql/mysql.sock

So, how to force mysqltcl to connect same ?
Im someone opposite to a tcl-guru, so forgive me.
Back to top
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Sun Jun 17, 2007 12:04 pm    Post subject: Reply with quote

if you show us how your using mysql::connect then maybe we can help.

If the port is the default (3306), dont add the -port option, if the mysql server is local, put -host localhost instead of 127.0.0.1. I find it best to put the -db option first, followed by -user -password and then -host.

I found that it doesn't work some ways, but it always seems to work in that order for me...

Also, i donlt recommend using the -socket option.

Hope this helps Smile
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
ben
Voice


Joined: 16 Jun 2007
Posts: 4

PostPosted: Sun Jun 17, 2007 1:23 pm    Post subject: Reply with quote

Thats how I have:
set sqlhand [mysqlconnect -host $sdt(hostname) -user $sdt(username) -password $sdt(password)]
mysqluse $sqlhand $sdt(database)

And I still get:
Tcl error [sdt:chat]: mysqlconnect/db server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Even if I do, as you recommended:
[mysqlconnect -user $sdt(username) -password $sdt(password) -host $sdt(hostname)]
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