# Apache, Php, and mysql?



## cutekangaroo (Feb 28, 2005)

I have ran a webserver on my computer (windows) and had alot of problems with server crashing. Now I got a dedicated computer (trashed all my windows and got Macs). I love them. Now the problem is:

1) getting rid of the built-in apache or installing the latest version of apache

2) getting php to work (I think apache as default have this on)

3) getting mysql to run. This is the problem I am currently having the biggest problem right now.

I'm using the apache built-in to the Mac OS X, but i want the latest (security reasons). But most of all, could anyone show me step by step on how to get mysql installed, running, create my username, and manage my database? 

I'm not a very unix type of person. Anyway, my problem ends when I ./mysql/bin/ and then mysqladmin create ...

I googled everywhere and none work. Either I got it running and I don't know how to create a user or it's not up and running at all. Please try not to link me to another one of your google search, I've done enough.


----------



## ElDiabloConCaca (Feb 28, 2005)

Here's a site you may want to visit:

http://www.entropy.ch/home/

This guy builds custom Mac OS X installer packages for MySQL, PostgreSQL, PHP, Apache and several other software packages -- very little configuration needed.  Simply launch his installer package and follow the instructions.  I believe he also has some step-by-steps to get them all to work together.

If you'd like to ditch Apple's Apache installation and use an Apache 2.0 installation, http://www.serverlogistics.com/ offers a complete Apache 2 installation package much like the packages found on the previously mentioned site.

I hope that helps!


----------



## cutekangaroo (Feb 28, 2005)

Ok, so I went to serverlogistics.com, installed them. Got Apache and php installed and running fine. Now after I installed mysql ...I get this error when I tried to run phpmyadmin...

#2002 - Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 

It's also the same /tmp/mysql/sock error when i tried to get mysql running or do anything in the terminal with mysql.

also, i followed on making the .bash_profile, but that does it no good either. Yes, I even put the #PATH line in that file.


Also, I have installed mysql before (diff versions), I deleted the /mysql and any other mysql related folder from /usr/local/


----------



## ElDiabloConCaca (Feb 28, 2005)

Hmmm... I don't have a ton of experience with mySQL, but I know that you must initially set a password for the admin program somehow... maybe this will help:

http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/Default_privileges.html


----------



## cutekangaroo (Feb 28, 2005)

i tried to access the mysqladmin with some subcommand (mysqladmin createdatabase ...whatever). but they all return command not found.

I tried to start the server by : cd /Library/MySQL ; /Library/MySQL/bin/mysqld_safe &

but I get permission denied. What's going on?


----------



## cutekangaroo (Feb 28, 2005)

Well. I finally got mysql to work, FOR THE FIRST TIME ON A (my) MAC!

I don't know how I did it, but I:

shell> sudo -u mysql ./bin/mysql_install_db --force

then again...
shell> sudo -u mysql ./bin/mysql_install_db
This time, in the end, it "Fixing permissions..." then logout. I have no idea what happened but it works now.


----------



## drunkmac (Mar 1, 2005)

try to install phpMyAdmin. It's the only way to go for SQL management and it's built with PHP so you know it's goooood.

http://www.phpmyadmin.net/home_page/


----------



## delsoljb32 (Mar 1, 2005)

yep, ive used phpMyAdmin, works great.


----------



## aicul (Mar 2, 2005)

Install mySQL is a pain, the process is obviously evident to the desginer but not to the novice. 

I had a long protracted battle to get it to work. Instructions are too vague and full of don't forget this, and maybe you may wish to do that. A "novice" install (a.k.a. simple install) would really help.

But its a great free database system!

 Careful, don't forget that you may have to restart the mySQL server at each Mac restart.


----------



## pds (Mar 2, 2005)

phpmyadmin is standard

cocoamysql is very sweet. It is available at serverlogistics too.(I think)


----------

