Mysql Download for Mac Os X Mountain Lion Updated
Mysql Download for Mac Os X Mountain Lion
In the recent version of Mac OS X, the web server is ane of the component that is built-in by default. Prior to Mount Lion, users can easily turn on the web server via the "Web Sharing" option in the Sharing Preference pane. That component was removed in Mountain Lion. In this tutorial, nosotros will show yous how to actuate the spider web server in Mount Panthera leo, besides as setting upwardly PHP, MySQL and PhpMyAdmin. At the finish of this tutorial, yous will take a MAMP (Mac, Apache, MySQL, Php) server running on your Mac.
Starting the Apache server
Apache server is pre-installed in Mac Bone Ten, so at that place is no need to install information technology. Withal, to start the Apache server, we will have to apply command line in the Terminal.
1. Open the Final (information technology can be plant under the Applications -> Utilities section).
2. Blazon the following command:
This will first the Apache server. To make certain that it is working, open up a browser and blazon "http://localhost" in the address bar. If yous run across a "Information technology works!" bulletin, so your Apache server is running fine.
To restart the Apache server, use the command:
To stop the Apache server, use the command:
Activating the PHP module
The Apache server is simply skillful enough for you to run static HTML files. If you want to run a more complicated setup, similar installing WordPress, you volition need to activate the PHP module.
PHP is pre-installed in Mac OS X equally well, but information technology is not included by default.
ane. In the terminal, type:
sudo nano /etc/apache2/httpd.conf
This will open the Apache config file.
ii. Remove down the list until you see the line:
#LoadModule php5_module libexec/apache2/libphp5.so
Remove the "#" in front of the line, and then information technology becomes:
LoadModule php5_module libexec/apache2/libphp5.so
iii. Salve the changes (using shortcut key "Ctrl + o") and leave (using shortcut central "Ctrl + ten"). Restart Apache.
The PHP module is now activated.
Configuring Sites folder
By default, Apache serves files that are in the folder location "/Library/WebServer/Documents". On a multiple users organisation, you can setup the spider web server to serve files for different users using the URL "http://localhost/~username".
1. Open the Finder and go to your Home folder (the folder with a Home icon and your username). Create a new folder "Sites" if it is not available.
two. Back to the Terminal, type the command:
sudo nano /etc/apache2/users/username.conf
Replace the "username" with your login username. In my case, it volition be "sudo nano /etc/apache2/users/damienoh.conf".
3. Copy and paste the following code to the conf file.
<Directory "/Users/username/Sites/" > Options Indexes MultiViews AllowOverride All Society permit,deny Permit from all </Directory>
Once again, supplant the "username" with your login username. Save (Ctrl + o) and exit (Ctrl + x) the file.
iv. Next, type the control:
nano /Users/username/Sites/phpinfo.php
and paste the line:
Save and exit the file.
Restart Apache server
5. In your browser, blazon "http://localhost/~username/phpinfo.php". You should see the PHP info page, if everything is running fine.
Setting upwards MySQL
MySQL is not included in Mountain Panthera leo, so y'all will need to download and install it manually.
i. Get to MySQL Download site and download the MySQL installer for Mac. For easier installation, yous might desire to grab the .DMG image than the 1 in .tar.gz format.
Note: Y'all don't have to sign upward for an account to download the file. Just click the "No thanks, just beginning my download." will exercise.
2. Once the download is completed, open up upwardly the installer, you should see 2 .pkg files and 1 .prefPane file. Install all three of them.
3. Later the installation, you can go to "System Preferences -> mySQL" and outset the MySQL instance.
Setting upi MySQL root password
In the Terminal, type the control:
/usr/local/mysql/bin/mysqladmin -u root countersign 'yourpasswordhere'
Supersede the "yourpasswordhere" with your own countersign.
Note: Do not confuse this password with your Mac login account. They are not the same. This is the countersign for the script to access your database.
Annotation: Removing MySQL is not equally straightforward. Run the commands, line past line, in the terminal:
sudo rm /usr/local/mysql sudo rm -rf /usr/local/mysql* sudo rm -rf /Library/StartupItems/MySQLCOM sudo rm -rf /Library/PreferencePanes/My* rm -rf ~/Library/PreferencePanes/My* sudo rm -rf /Library/Receipts/mysql* sudo rm -rf /Library/Receipts/MySQL* sudo rm -rf /private/var/db/receipts/*mysql*
Open up the file "hostconfig" with the control "sudo nano /etc/hostconfig" and remove the line MYSQLCOM=-Yeah-.
Installing PhpMyAdmin
PhpMyAdmin is basically a bunch of PHP files, so installing them is a breeze.
1. Download PhpMyAdmin from its website.
ii. Extract the compressed file to your Sites folder and rename it as "phpmyadmin".
iii. Open the "phpmyadmin" folder and create a new folder telephone call "config". Change its permission with the command:
chmod o+due west ~/Sites/phpmyadmin/config
iv. Adjacent, in your browse, navigate to "http://localhost/~username/phpmyadmin/setup". This volition bring upward the setup page where you tin can connect PhpMyAdmin to your MySQL server.
5. Click the "New Server" button.
half-dozen. Get to the "Authentication" tab and enter MySQL root password in the "Password for config auth" field.
Click "Save".
7. Lastly, enter the following commands in the terminal:
sudo mkdir /var/mysql sudo ln -south /tmp/mysql.sock /var/mysql/mysql.sock
Now, go to "http://localhost/~username/phpmyadmin". You should be able to login and create database now.
Conclusion
It will probably be easier if you install a 3rd party tool like MAMP, only that will add duplicate features to what is already bachelor in your Mac. With a picayune tinkering, you lot tin can hands get your Mac to be a spider web server for all your web hosting needs.
Is this article useful?
Subscribe to our newsletter!
Our latest tutorials delivered directly to your inbox
Mysql Download for Mac Os X Mountain Lion
Posted by: diazfrant1942.blogspot.com
Post a Comment for "Mysql Download for Mac Os X Mountain Lion Updated"