Since Mac OS X Yosemite, Apache and PHP come packaged with the OS, So you only need to enable PHP and install MySQL. Download your version. I want to install MySQL on Mac OS X Yosemite, create a new user, then create a new database called 'mydatabase'. How can I do this? What I've tried: From command line, brew install mysql.
![Download Mysql For Mac Yosemite Download Mysql For Mac Yosemite](/uploads/1/1/8/5/118548365/604867856.jpg)
Upgraded to Yosemite , great . now lets see how to setup Apache webserver with PHP and MySQL . unlike 10.7 Lion or 10.6 there is no prefrence pane option to turn on Apache . but don’t worry MacOSX Yosemite comes with Apache and you can turn on it using Terminal . Okay lets see how to setup Apache PHP and MySQL setup in Mac OS X Yosemite .
setup apache
open terminal and type
now open your favourite browser and browse to http://localhost
you will see default apache page
you will see default apache page
Mysql For Mac
Lets setup user-dir for per user
I am going to use
nano
in this guide feel free to use any of your favourite editor .- Enable
mod_authz_core, mod_authz_host, mod_userdir
andmod_userdir.so
modules
Uncomment These Three Modules For Now ( Remove “#” sign from the starting of line if “#” is present )
You can dump list of all Loaded Modules using
sudo apachectl -M
command .Then Navigate to bottom of the file , and uncomment following line
then open
/etc/apache2/extra/httpd-userdir.conf
and uncomment following line
Okay Now Setup your user.conf
Now Create
Sites
Folder in your Home DirectorNow test apache config using
Now Create a File inside Sites Directory Name it
Enter Some Plain HTML and save that
index.html
Enter Some Plain HTML and save that
Now Let’s Test Apache Configuration
then restart apache
then open browser and browse to http://localhost/~yourusername , Note that “~” tilde in url
Download Mysql For Mac
your will see something like this
Setup PHP
and uncomment
and test apache config using
then create a file in your Sites Directory
apachectl -t
then create a file in your Sites Directory
then enter simple
phpinfo()
in index.phpand browse to http://localhost/~username/index.php
you will see phpinfo page
you will see phpinfo page
setup MySQL
Download MySQL (Download DMG ) : http://dev.mysql.com/downloads/mysql/
Install that Like another Package of MacOSX there is nothing tricky , install prefPane ( included in DMG )
adding mysql in $PATH
above command will create
.bash_login
file in your home directory and it will add MySQL in PATHrestart your terminal and start mysql from PrefrencePane
okay now open terminal and type
![Download Mysql For Mac Yosemite Download Mysql For Mac Yosemite](/uploads/1/1/8/5/118548365/762282477.png)
All Done Now MySQL is set up
Now You Have Working APACHE PHP AND MYSQL
Install Mysql Mac
ScreenCast
Mysql Download Mac Os
happy Coding ?