Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
Installing Apache, MySQL, and PHP with David Gassner describes how to install and configure Apache HTTP server, MySQL database server, and PHP, known as the AMP stack, on a local development computer. Chapters are devoted to multiple installation approaches: installing the components separately on both Windows and Mac (including coverage of Apache and PHP on Mac OS X 10.7 Lion and 10.8 Mountain Lion), installing the pre-packaged Apache and MySQL distributions in WampServer on Windows and MAMP on Mac, and installing the cross-platform XAMPP and Bitnami on both Mac and Windows. Exercise files are included with the course.
This course was updated on 07/06/2012.
If you are running MAMP, ZAMP or another one of the simple AMP bundles, it's easy to uninstall my SQL. You just shut down the servers and drag the bundle to the Trash. But if you've installed the individual component from MySQL.com, the steps are a little bit more complex. The first step is to make sure you've shut down MySQL. If you installed the Preferences pane, you can do it from there. I'll go to System Preferences and open the MySQL pane from the other section at the bottom.
And I'll click Stop MySQL Server. Another way to do this is from the command line. I'll restart MySQL, and then I'll go to Terminal. In Terminal, I'll switch to the following folder, /usr/local/mysql/bin, and I'll use the application mysqladmin using this command. ./my sqladmin, -u for user, then my user name, which is root. If I've set up a root user password, I would also type in -p now, and then the password.
I haven't set up a password, so I'll leave that out. And then I'll type shutdown. And in the background, you can see in the Preferences pane that again MySQL has stopped. After you've stopped the server, the next step is to remove the configuration that starts MySQL automatically on start up. You can simply uncheck the checkbox. And if you're prompted for a password, you can enter it and that'll turn off the configuration. But there's still a little bit of information left behind. There's a text file called hostconfig, and it contains an entry for this setting.
To remove it, you'll need to use a text editor. Once again, I'll go to Terminal for this. I'll go to the etc folder underneath the root. Here is the file, hostconfig. I'm going to edit it using a text editor called Nano, which is included with OSX. I'll start with sudo for super user do, then nano, then hostconfig. When prompted for my administrative password, I'll type it in.
That's your user password, not the MySQL password. I'm looking for this line starting with MYSQLCOM. It'll have a value of either yes or no. Either way, delete it. Your file might look very different than mine. It depends on what software you have installed on your system. Now, I'll hold the Ctrl key and press X for exit, then let go and press Y for yes. And then, Enter to overwrite the hostconfig file. To make sure that the change took, I'll repeat that command.
I'll press the Up Arrow to bring that command back. Press Enter, and I see that the file has changed. I'll press Ctrl+X again to exit. Finally, you'll need to remove all of the MySQL files. This takes quite a few commands that you'll enter from terminal. To make this easier, I've included a text file that's part of the free Exercise Files that come with the course. It's a file called MySQLUninstallOnMac.txt. You can open it in any text editor.
It has a series of commands that all start with sudo for super user do, then rm for remove, and then the name of a folder, file or set of files. I'll select and copy those commands to the clipboard. Then I'll come back to Terminal and then, I'm going to press Cmd+V to paste the commands into place. And when I do that, they'll all be executed. And that's it. MySQL is gone. There's one error at the bottom indicating that the file my.cnf does not exist.
On your system, that file might exist depending on what configurations you've applied to the server. mine, I haven't created it and so I'm told that it wasn't there. To fully test this, I'll close System Preferences and then, I'll start it again from the Apple menu. And now the MySQL pane is gone from the bottom of the System Preferences dialog. So those are the steps for uninstalling MySQL on Mac. It takes a few steps to clean up, removing all the configurations and all of the MySQL files.
Find answers to the most frequently asked questions about Installing Apache, MySQL, and PHP.
Here are the FAQs that matched your search "":
Sorry, there are no matches for your search ""—to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.