Linux-based tcl for mysql and linuxtcl for mysql
Check the tcl wiki, tcl more mature mysql database is mysqltcl, so to its official website (http://www.xdobry.de/mysqltcl/) download version 3.05 back, read README no special matters, conventional linux software installation trilogy:
./Configure
Make
Make install
In the middle of make, I encountered some minor troubles and reported:
Checking for mysql header... configure: error: Cannot find mysql. h in/usr/include/mysql use-with-mysql-include =?
Obviously, the mysql development library is not installed. Therefore, download the libmysql-devel rpm package of the corresponding version of mandriva 2010 spring at http://rpm.pbone.net/. the following dependent software packages are missing during installation:
Devel (libcrypto) is needed by libmysql-devel-5.1.46-4mdv2010.1.i586
Devel (libssl) is needed by libmysql-devel-5.1.46-4mdv2010.1.i586
Devel (libz) is needed by libmysql-devel-5.1.46-4mdv2010.1.i586
Multiarch-utils is needed by libmysql-devel-5.1.46-4mdv2010.1.i586
Continue to download the corresponding version of The multiarch-utils-1.0.10 Mandriva 2010 spring, libopenssl1.0.0-devel, zlib1-devel-1.2. 3 RPM package installation is complete, and then compile mysqltcl, it is easy to pass.
Because mysqltcl is installed in/usr/lib/mysqltcl-3.02 by default, instead of the default load directory/usr/lib/tcl8.6, you need to add the corresponding package loading path to auto_path to automatically load, tcl will load pkgIndex to the corresponding directory. the source code of the tcl file is as follows:
#! /Usr/bin/tclsh
Lappend auto_path/usr/lib/mysqltcl-3.02
Package require mysqltcl
: Mysql: connect-host localhost-user root-password 123
If no error message is reported, it indicates that everything went smoothly. What is the testing code for other functions? I am very lazy. I suggest you follow the API manual in the doc directory in the mysqltcl installation package ....