Well I seemed to have got things installed and running but I'm still testing. I found a very nice step-by-step in mailing.database.mysql from H. Gonzalez.
I've included his post at the end. I would only add to his instructions to use "perl -MCPAN -e 'install DBI'" to install the DBI and "perl -MCPAN -e 'install DBD::mysql'" to install the mysql interface. (makes for a little less typing) As he mentions, there are errors but most seem to be caused by some confusion in the way cygwin handles the localhost socket. If you use an IP address or hostname, connections are made (see the WARNING below.) Actually, I saw different error msgs than he saw, but I'm working with later versions as well. After running the perl CPAN autoinstall and having it complain that there are errors and can't install, I just ran "make install" and it installed. Inititial tests (mysql.t perl script) seem to show that some things work but that some things are not ok. I still need to check on that, but it does seem to be able to connect to a database and complete some tests. Thanks Hernan. Bill >From H. Gonzalez ... ************************************************************* I've just installed DBD::mysql over Cygwin . Reading the newsgroups, this seems to be a daunting task. I managed to get it working it (with some struggle, little hope and moderate success) and I thought that someone might be interested. Here it goes: ---------------------------------------------------------------- Scenario: - Win2000 - Mysql Server running over windows (3.23.49-nt) - Cygwin 1.3.3-2 Inside Cygwin : - Perl v5.6.1 (it comes with cgywin) - DBI 1.30 (downloaded from CPAN and installed as usual) ---------------------------------------------------------------- Steps: To install DBD:mysql, we need the client-side of mysql (libraries), but in the "cygwin world" . Hence, the first step is to download and install mysql (without server) in cgywin, apart from the server (which runs in wht win2000 space). Preliminary checks: - Check that the (win2000) binaries are not on the cygwin path (try to run "mysql" from the cygwin shell: it should not find the executable) - Check that the (cygwin) directory /usr/local/mysql DOES NOT EXIST (we will create it soon) Check also that the mysql server is listening (port 3306) and get a [database ; user ; password] to access the DB from host 127.0.0.1. Lets suppose we have: [ db_test user_test pass_test ] , and that the Win2000 mysql path is C:\mysql\ ; then, the command > C:\mysql\bin\mysql -u user_test -ppass_test -h 127.0.0.1 db_test should connect ok. (WARNING: use exactly that syntax: here, 127.0.0.1 is not the same as localhost! you MUST use a TCP connection, not a local socket; you've been warned) All the following, is run from the Cygwin shell: 1. Download msyql source ( mysql-3.23.53.tar.gz ) from mysql.com 2. Untar and configure with these options: $ ./configure --without-server --prefix=/usr/local/mysql \ --with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock 3. make ; make install Now, the mysql client libraries are installed. Let's go to DBD::mysql 4. Download DBD-mysql-2.1020.tar.gz from CPAN ; untar 5. Open Makefile.PL in your editor and edit the line : open(PIPE, "mysql_config" --$param |"); adding the full path to the command: open(PIPE, "/usr/local/mysql/bin/mysql_config --$param |"); 6. Configure: $ perl Makefile.PL --testdb=db_test --testuser=user_test \ --testpassword=pass_test --testhost=127.0.0.1 (replace with your own db/user/pass ) 7. $ make (there should be no errors) 8. $ make test Now (and this is the reason I wrote I had a "moderate success") some of the tests fail: t/00base............ok t/10dsnlist.........ok t/20createdrop......ok t/30insertfetch.....ok t/40bindparam.......ok t/40blobs...........ok t/40listfields......ok t/40nulls...........ok t/40numrows.........ok t/50chopblanks......ok t/50commit..........ok, 14/30 skipped: No transactions t/60leaks...........skipped test on this platform t/ak-dbd............ok t/akmisc............FAILED test 44 Failed 1/351 tests, 99.72% okay t/dbdadmin..........ok t/insertid..........ok t/mysql.............Confused test output: test 66 answered after test 66 Confused test output: test 66 answered after test 66 Confused test output: test 66 answered after test 66 Confused test output: test 66 answered after test 66 Confused test output: test 66 answered after test 66 ( ........... here a LOT of similar error lines follow.... ) 9. You may (as I did) hope that those errors are not important and go ahead: $ make install And that's all. I'm working with it (using a Movable Type test installation) and, until now, I've found no problems. Given the errors in the test suite, I would not recommend this for data-sensitive work, though. Hope this helps Hernan J. Gonzalez Buenos Aires, Argentina http://www.hjg.com.ar/ -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Bill McCormick Sent: Wednesday, July 02, 2003 2:08 PM To: [EMAIL PROTECTED] Subject: mysqlc There are a couple of different issues here: 1. connecting mysqlc client under cygwin bash shell 2. setting up the perl DBD::mysql I'm running mysql server (win32) and I think mysqlc client should be able to connect running under cygwin. It runs under cmd.exe; under cygwin it just hangs. If I don't specify user (under bash) it complains as it should ... ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) Now since mysql is totally socket based, I shouldn't have to run mysql under cygwin (not to mention jump through recompiling hoops to get there.) Running the Winbloz server should be the path of least resistance ... right? I'm trying to set up a web development env with cygwin (apache,php,perl,mysql). Shouldn't be an issue but I'm also running postgresql for something else. So I'm concerned that if I can't get a simple command line client to connect and work with mysql, perl and php will have problems as well under cygwin. Got Apache working, mysql server running under windows, trying to get the perl DBD set up at the moment ... perl -MCPAN -e 'install DBD::mysql' results in ... **************************************** Removing previously used /home/Bill/.cpan/build/DBD-mysql-2.9002 CPAN.pm: Going to build R/RU/RUDY/DBD-mysql-2.9002.tar.gz Can't exec "mysql_config": No such file or directory at Makefile.PL line 174. readline() on closed filehandle PIPE at Makefile.PL line 176. Can't exec "mysql_config": No such file or directory at Makefile.PL line 174. readline() on closed filehandle PIPE at Makefile.PL line 176. Can't exec "mysql_config": No such file or directory at Makefile.PL line 174. readline() on closed filehandle PIPE at Makefile.PL line 176. Can't exec "mysql_config": No such file or directory at Makefile.PL line 174. readline() on closed filehandle PIPE at Makefile.PL line 176. Can't exec "mysql_config": No such file or directory at Makefile.PL line 174. readline() on closed filehandle PIPE at Makefile.PL line 176. Failed to determine directory of mysql.h. Use perl Makefile.PL --cflags=-I<dir> to set this directory. For details see the INSTALL.html file, section "C Compiler flags" or type perl Makefile.PL --help Running make test Make had some problems, maybe interrupted? Won't test Running make install Make had some problems, maybe interrupted? Won't install ******************************************* Under linux I'd do this as root, but since user Bill as administrator privileges this shouldn't be the issue. Thanks, Bill --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.491 / Virus Database: 290 - Release Date: 6/18/2003 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.491 / Virus Database: 290 - Release Date: 6/18/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.491 / Virus Database: 290 - Release Date: 6/18/2003 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/