| View previous topic :: View next topic |
| Author |
Message |
ben Voice
Joined: 16 Jun 2007 Posts: 4
|
Posted: Sat Jun 16, 2007 5:09 pm Post subject: Mysqltcl [Can't connect to local MySQL...] |
|
|
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 |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Sun Jun 17, 2007 12:04 pm Post subject: |
|
|
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  _________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
ben Voice
Joined: 16 Jun 2007 Posts: 4
|
Posted: Sun Jun 17, 2007 1:23 pm Post subject: |
|
|
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 |
|
 |
|