
wade3061
New User
Feb 4, 2013, 5:06 PM
Post #1 of 2
(20510 views)
|
Help with installing DBD:mysql
|
Can't Post
|
|
I've been working on getting DBD:mysql installed on my Mac for about 20 hours now. I've tried almost everything that I could find online and nothing seems to be working. I'm running OS X and I have MySQL installed as part of XAMPP. Can someone help me find a solution to this? It might help to know that I had NO IDEA even what Terminal was before starting this, so assume I don't know a single thing about Mac, Terminal, Perl, anything. I'm simply trying to execute prewritten Perl scripts that need DBI and DBD:mysql to function. I have downloaded the latest DBD-mysql and placed the folder into my '/System/Library/Perl/' folder. In Terminal, I typed in 'cd /System/Library/Perl/' to get into the directory and it works. I then type in 'sudo Makefile.PL' and I get this error:
Can't exec "mysql_config": No such file or directory at Makefile.PL line 83. Cannot find the file 'mysql_config'! Your execution PATH doesn't seem not contain the path to mysql_config. Resorting to guessed values! Can't exec "mysql_config": No such file or directory at Makefile.PL line 479. Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located Can't exec "mysql_config": No such file or directory at Makefile.PL line 479. Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located Can't exec "mysql_config": No such file or directory at Makefile.PL line 479. Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located PLEASE NOTE: For 'make test' to run properly, you must ensure that the database user 'Mac' can connect to your MySQL server and has the proper privileges that these tests require such as 'drop table', 'create table', 'drop procedure', 'create procedure' as well as others. mysql> grant all privileges on test.* to 'Mac'@'localhost' identified by 's3kr1t'; You can also optionally set the user to run 'make test' with: perl Makefile.PL --testuser=username Can't exec "mysql_config": No such file or directory at Makefile.PL line 479. Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located Can't exec "mysql_config": No such file or directory at Makefile.PL line 479. Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located Can't exec "mysql_config": No such file or directory at Makefile.PL line 479. Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located 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 Wades-MacBook-Pro:DBD-mysql- I've also tried pointing to the mysql_config file directly and it says this:
You can also optionally set the user to run 'make test' with: perl Makefile.PL --testuser=username I will use the following settings for compiling and testing: cflags (mysql_config) = -I/Applications/XAMPP/xamppfiles/include/mysql -I/Applications/XAMPP/xamppfiles/include -L/Applications/XAMPP/xamppfiles/lib -mmacosx-version-min=10.4 -arch i386 -arch ppc -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL embedded (mysql_config) = ldflags (mysql_config) = -I/Applications/XAMPP/xamppfiles/include -mmacosx-version-min=10.4 libs (mysql_config) = -L/Applications/XAMPP/xamppfiles/lib -L/Applications/XAMPP/xamppfiles/lib/mysql -lmysqlclient -lz -lm mysql_config (Users choice) = /Applications/XAMPP/xamppfiles/bin/mysql_config nocatchstderr (default ) = 0 nofoundrows (default ) = 0 ssl (guessed ) = 0 testdb (default ) = test testhost (default ) = testpassword (default ) = testsocket (default ) = testuser (guessed ) = Mac To change these settings, see 'perl Makefile.PL --help' and 'perldoc INSTALL'. Checking if your kit is complete... Looks good Multiple copies of Driver.xst found in: /Library/Perl/5.12/darwin-thread-multi-2level/auto/DBI/ /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/auto/DBI/ at Makefile.PL line 941 Using DBI 1.623 (for perl 5.012004 on darwin-thread-multi-2level) installed in /Library/Perl/5.12/darwin-thread-multi-2level/auto/DBI/ Writing Makefile for DBD::mysql Then I follow that up with 'make' and I get this:
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm clang -c -I/Library/Perl/5.12/darwin-thread-multi-2level/auto/DBI -I/Applications/XAMPP/xamppfiles/include/mysql -I/Applications/XAMPP/xamppfiles/include -L/Applications/XAMPP/xamppfiles/lib -mmacosx-version-min=10.4 -arch i386 -arch ppc -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -arch i386 -arch x86_64 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include -Os -DVERSION=\"4.022\" -DXS_VERSION=\"4.022\" "-I/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE" dbdimp.c clang: warning: not using the clang compiler for the 'powerpc' architecture In file included from dbdimp.c:20: ./dbdimp.h:23:10: fatal error: 'mysql.h' file not found #include <mysql.h> /* Comes with MySQL-devel */ ^ 1 error generated. make: *** [dbdimp.o] Error 1 What do I need to do in order to make this work? Installed DBI and DBD in 3 minutes on a PC and seems impossible on Mac. Can anyone help?
|