haimingwei
07-16-2010, 12:18 PM
(05-04-2010 12:54 PM)Kwok Wrote: [ -> ](05-03-2010 11:55 PM)dhoen Wrote: [ -> ]Any news on installing on Snow Leopard? I am currently trying to do this... and starting to pull out my hair! Thanks in advance for any help.
I install mine on a Intel Core 2 Duo Machine running OS 10.6.2. I use mysql-5.1.43-osx10.6-x86_64 binary.
Before installing DBD::MySQL, I set up my environment by:
PATH=$PATH:/usr/local/mysql/bin
You might have to change this if mysql installed in different directory.
You also need to set up your user name and password for mysql
Then:
$ perl -MCPAN -e 'shell'
cpan[1]> get DBD::mysql
cpan[2]> exit
$ cd ~/.cpan/build/DBD-mysql-4.013-cB623q/
$ perl Makefile.PL --testuser='mysql_user_name' --testpassword='mysql_passwd'
$ make
$ make test
It should say all test successful.
Finally:
$ sudo make install
Hope this helpful.
Kwok
I had most of the problems mentioned in this thread too and eventually had success. Thank you all very much.
I'm using a new Macbook Pro 13-inch, with Snow Leopard and the Xcode from the Apple Website. 4GB Ram, 500GB Fujitsu drive. Apache 2.2.
The new Snow Leopard apparently uses the 64-bit Perl, as I tried installing the MySQL 32-bit package first and had the trouble with the DBD::mysql installation as mentioned by others (above).
I also had the PATH problem, which prevented the secure installation. Setting the $PATH to use the /usr/local/mysql/bin. By the way, there is a file /private/etc/paths that you can edit to do this. Once that was done, I was able to complete the mysql_secure_installation, create a non-root user, create a my.cnf from the my-large.cnf file, then follow the above instruction.
I have pasted a ... simple shell script that makes it easy to remove all the mysql, including the preference pane (other) ... so you can start over again, with the 64-bit mysql; or with the 32-bit mysql (if that matches your Perl / word size).
Thanks again for all of your help and suggestions from everyone.
------- code ----------
#!/bin/bash
locations="
/usr/local/mysql
/usr/local/mysql*
/Library/StartupItems/MySQLCOM
/Library/PreferencePanes/My*
/Users/ernest/Library/PreferencePanes/My*
/Library/Receipts/mysql*
/Library/Receipts/MySQL*
/var/db/receipts/com.mysql.*
"
for i in $locations
do
rm -rf $i
done
if [ `grep "MYSQLCOM" /etc/hostconfig` ]; then
echo "You also need to edit the /etc/hostconfig file"
else
echo "You do not need to edit the /etc/hostconfig file"
fi
exit 0
-------- end code --------