In my previous two articles, we looked at how to get Apache Web Sharing and PHP up and running in OS X 10.8 Mountain Lion via some quick trips to the Terminal. While Apache and PHP are a powerful duo indeed, with their ability to serve up web pages and dynamically script the creation of web pages respectively, web developers everywhere will tell you the package is not complete without MySQL. MySQL Enterprise Edition includes the most comprehensive set of advanced features and management tools for MySQL. Go to the MySQL site, scroll down the page and look for version Mac OS X ver. 10.6 (x86, 64-bit), DMG Archive. Click the blue download button. This will take you to a page that asks you to login or signup. It will be named according to the MySQL version and the OS X version you have chosen. For example, if you have downloaded the package for MySQL 5.6.51 and OS X 10.8, double-click mysql-5.6.51-osx- 10.8.
Apache and PHP come packaged with OS X. To create a local web server, all you need to do is configure Apache and install MySQL.
Enable Apache on Mac OS X
To check what version of apache you have currently installed on your mac just open you terminal and type
httpd -v
Verify if apache is running by accessing http://localhost:
If you get “This site can’t be reached”, you need to start apache, just type,
sudo apachectl start
and press enter:Verify localhost again:
if you see “It works!” apache is running.
Apache Commands
You can start, stop, and restart your server by typing:
Setting up root directory
Apache’s default directory is /Library/WebServer/Documents that is where `It work’s!` file is located at.
Move into apache users folder:
Type
ls
and check if you have a config file named after your yourusername.conf
username, if you can’t find one, that’s ok, then just type sudo nano yourusername.conf
Add this configuration to your file:
Press “Ctrl + x” to exit, “y” to save changes and hit enter.
Then to give apache permissions to read we type
sudo chmod 644 YourUserName.conf
and press enter
, lastly we type sudo apachectl restart
Done!
Mac OSX 10.8 comes with PHP 5.2 by default, in order to check what version you currently have just type
php -v
.Whatever is the current version of your PHP, go ahead and update it here.
Enable PHP
cd into Documents:
cd into apache directory:
then edit your config file:
then search “PHP” by using ctrl + w” :
Uncomment the following line (remove
#
):Now apache can serve PHP.
Configure PHP .ini
cd into /usr/local/php5/php.d
The configuration file (php.ini) is read when PHP starts up. For the server module versions of PHP, this happens only once when the web server is started. For the CGI and CLI versions, it happens on every invocation.
Here you can configure your time zone and other settings, just type:
Done!.
Download it from here
You don’t have to log in, just click “No thanks, just start my download”.
Run the installer.
Finish installation and set it up to be running on startup by going into your system preferences bottom line and clicking on MySQL icon, you will get a default password, save it, you will need it later.
Configure MySQL
Add MySQL to PATH
The path is a list of directories that Unix uses in order to locate programs on the machine that it can run.
![Mysql Download Mac Os X 10.8 Mysql Download Mac Os X 10.8](/uploads/1/2/6/6/126632234/105391748.png)
If you type which php in your terminal you will get back its location:
Up until this point, MySQL has not yet been added to the path, we have to add the directory where MySQL resides to that list.
You can take a look at that list by typing:
MySQL is located at:
Now we need to add this path to PATH, just type:
We need to add this to .bash_profile:
Ctrl + x
to exit then press “y” to save changes and enter to confirm file name.Set root password
To set a new password:
If you already have a password and you want to change it, then type:
All ready!
Request–response, or request–reply, is one of the basic methods computers use to communicate with each other.
The browser sends a request for some data and apache responds to the request. Usually, there is a series of such interchanges until the complete response is sent.
This image illustrates how it works.
You can check if everything works by creating a .php file inside your /Sites directory, launch your browser and type in the address bar http://localhost/~yourusername/filename.php
Now your development environment is ready. Enjoy!
Adrian Prieto
Mysql Download Mac Os
“If you are not willing to learn, no one can help you. If you are determined to learn, no one can stop you.” ― Zig Ziglar
Mysql Os X Download
Latest posts by Adrian Prieto (see all)
- How To Set Up Your WordPress Development Environment with a Large Database ft. MAMP & MAC, The Really Easy Guide - April 24, 2020
- Next.js ▲ + Typescript + Storybook The Really Simple Guide 2019 - November 25, 2019
- Next.js + Styled Components The Really Simple Guide ▲ + ? - June 26, 2018
Check compatibility
You can upgrade to OS Yosemite on any of the following Mac models. Your Mac also needs at least 2GB of memory and 8GB of available storage space.
MacBook introduced in 2009 or later, plus MacBook (13-inch, Aluminum, Late 2008)
MacBook Air introduced in late 2008 or later
MacBook Pro introduced in mid 2007 or later
Mac mini introduced in early 2009 or later
iMac introduced in mid 2007 or later
Mac Pro introduced in early 2008 or later
Xserve models introduced in early 2009
MacBook Air introduced in late 2008 or later
MacBook Pro introduced in mid 2007 or later
Mac mini introduced in early 2009 or later
iMac introduced in mid 2007 or later
Mac Pro introduced in early 2008 or later
Xserve models introduced in early 2009
To find your Mac model, memory, storage space, and macOS version, choose About This Mac from the Apple menu . If your Mac isn't compatible with OS X Yosemite, the installer will let you know.
Make a backup
Before installing any upgrade, it’s a good idea to back up your Mac. Time Machine makes it simple, and other backup methods are also available. Learn how to back up your Mac.
Get connected
It takes time to download and install OS X, so make sure that you have a reliable Internet connection. If you're using a Mac notebook computer, plug it into AC power.
Download OS X Yosemite
For the strongest security and latest features, find out whether you can upgrade to macOS Catalina, the latest version of macOS.
If you still need OS X Yosemite, use this link: Download OS X Yosemite. A file named InstallMacOSX.dmg will download to your Mac.
Mysql Download Mac Os X 10.88 Mountain Lion
Install the macOS installer
Double-click the downloaded file to open a window showing its contents. Then double-click the file within, named InstallMacOSX.pkg.
Follow the onscreen instructions, which will guide you through the steps necessary to install.
Begin installation
After installation of the installer is complete, open the Applications folder on your Mac, then double-click the file named Install OS X Yosemite.
Click Continue and follow the onscreen instructions. You might find it easiest to begin installation in the evening so that it can complete overnight, if needed.
Allow installation to complete
Please allow installation to complete without putting your Mac to sleep or closing its lid. Your Mac might restart, show a progress bar, or show a blank screen several times as it installs both OS X and related updates to your Mac firmware.
Learn more
- OS X Yosemite won't install on top of a later version of macOS, but you can erase your disk first or install on another disk.
- You can use macOS Recovery to reinstall macOS.