Download Mysql for Mac 10.11 Updated
Download Mysql for Mac 10.11
A few months ago, I wrote about how to install MySQL on Windows with IIS. Now I desire to show you how to create an AMP web programming stack (Apache, MySQL & PHP) on Mac Bone X. As with Windows, you could simply go with a ready-made development environment like MAMP but, if you lot're going to be doing real database and web pattern work with MySQL, information technology'southward best to know how everything works.
Groundwork
For this demonstration, I'one thousand going to be using Mac OS X El Capitan (v.10.eleven), the latest version as of this writing. My installation environment is a hosted Mac server with ane GB of RAM and twoscore GB of deejay space. I will be demonstrating the process using the Final commands.
Unlike Windows, OS X already includes the Apache web server and PHP linguistic communication pre-installed so information technology'due south a much simpler process to ensure that everything is working together. Y'all volition demand root access in gild to install and configure the components.
Establishing Root Admission
Open the Final environs from the Utilities (Become >> Utilities from top menu and then select Concluding).
In OS X, it is possible to get root admission by activating the root user account with dsenableroot. Improper employ of this command can open up upward your organization to security issues, however. It's safer to use sudo (due southuperuser do) on the individual commands or temporarily switch users with sudo su –.
For more information on working with the root user, seehttps://back up.apple.com/en-us/HT204012.
Activating Apache
Y'all tin can activate Apache simply past issuing either of the the following commands in the Terminal.
sudo apachectl start
sudo apachectl restart
The restart command will start Apache even if it's stopped. There won't be any notification on the control line as to the change in status and so y'all volition need to verify that Apache is working by opening a web browser window and navigating to the post-obit address:
http://localhost
If everything is working, you should become a simple white screen with the heading "It works!" indicating that the spider web server is up and running.
Configuring PHP and Apache
The Apache configuration file (httpd.conf) must be inverse to load the necessary PHP module and then that PHP pages can be served upwardly. This is hands done from the Terminal. First, you lot will need to alter to the Apache directory and you lot should make a backup of the file.
cd /etc/apache2/ cp httpd.conf httpd.conf.bak
To edit the file, y'all tin can utilize the control line editor vi or the Mac TextEdit program, either of which can be opened from the Terminal.
6 httpd.conf
open -a TextEdit httpd.conf
If yous're not familiar with vi (pronounced "vee-eye"), information technology's a powerful command-line editor common to UNIX-based systems and y'all tin can read more near using information technology on the University of Washington's site athttps://www.washington.edu/computing/unix/vi.html. If yous cull the TextEdit command from above, the TextEdit program volition open outside the Terminal and will load the configuration file for you lot to work with.
In either editor, you'll need to find the following line:
#LoadModule php5_module libexec/apache2/libphp5.so Remove the hashtag (#) from the offset of the line to un-comment information technology so relieve the file. You will then demand to restart Apache with the following control.
sudo apachectl restart
To verify that PHP is working with Apache, you tin can create a phpinfo.php file in the web certificate root folder where the localhost files reside. On Bone 10, this folder is by and large \Library\WebServer\Documents. Create a simple text file in that binder with the following text on the offset line:
<?php phpinfo(); ?>
Save the file with the name phpinfo.php and and then load the file in your web browser.
http://localhost/phpinfo.php
If everything is working, you should then get the PHP settings screen.
Article continues later advert
Installing MySQL
The latest versions of MySQL Community Server are available in TAR and DMG format from http://dev.mysql.com/downloads/mysql. I recommend the DMG format which is a disk epitome that can be mounted equally a drive attainable from your Desktop.
The image file contains a single PKG file which you can double-click to run the installation wizard. As of this writing, the latest version, five.vii.eleven is labeled for OS X x.10 merely I was able to install it with no bug on El Capitan (10.xi). During the installation, you lot will be asked to create a password for the root MySQL user – make sure to write this password down somewhere safe!
After the installation is finished, it's a expert thought to add the MySQL program directory to your PATH argument so you tin can run information technology from any directory. Use the following line in the Last to exercise this.
consign PATH=/usr/local/mysql/bin:$PATH Then, endeavour logging in to your new MySQL server equally the root user.
mysql -u root -p
It'southward too a adept idea to run mysql_secure_installation which does the following to secure your database server:
- Enables you to modify the root password that was chosen during installation.
- Provides the choice to remove the anonymous MySQL user.
- Provides the choice to disable remote logins.
- Allows you to remove the test database and admission to information technology.
- Reload the privilege tables
Now that MySQL is working, information technology needs to exist able to piece of work with PHP. This is done by creating a link to the MySQL socket file which will let PHP to communicate with the server. Inbound the following commands in the Concluding volition create a new MySQL directory in the organization Var directory and a symbolic link in that directory to the socket file.
cd /var mkdir mysql cd mysql ln -s /tmp/mysql.sock mysql.sock When the MySQL installation is finished, you should exist able to Access the MySQL preference pane shown in Figure two.11 from the Arrangement Preferences console. This pane enables you to start and end your MySQL server and ready it to start when the OS starts upwards.
Installing the Blueprint Tools
You lot probably won't desire to manage all of your databases from the Last and OS X supports some of the same graphical tools as Linux and Windows.
MySQL Workbench
MySQL Workbench is available from http://dev.mysql.com/downloads/workbench every bit a DMG paradigm file. Installing Workbench is equally simple every bit opening the mounted DMG paradigm and dragging the MySQL Workbench icon to the Applications binder when prompted. You volition then exist able to run the program from your Applications binder.
PHPMyAdmin
As a PHP application, PHPMyAdmin can too be installed within your new AMP surround, regardless of the operating organisation.
- Download the latest version from PHPMyAdmin.net. The parcel is available in ZIP format.
- UnZIP the files to a PHPMyAdmin subdirectory nether your Localhost binder, ordinarily \Library\WebServer\Documents.
- Copy the config.sample.inc.php file to config.inc.php and open the new file for editing.
- Look for the line that starts with $cfg [ 'blowfish_secret' ] = and add an encryption value of your choice. This value can be a series of random messages and numbers if you similar.
If you would like to have a default user and countersign for phpMyAdmin, yous can add together the following lines to the $cfg['Servers'] section of the file, substituting your own values for the user name and password.
$cfg [ 'Servers' ][ $i ][ 'user' ] = '<username>' ; $cfg [ 'Servers' ][ $i ][ 'password' ] = '<password>' ;
Once this is done, you should be able to run PHPMyAdmin but by navigating to http://localhost/PHPMyAdmin.
For more than information on installing PHPMyAdmin, encounter the documentation athttps://phpmyadmin.readthedocs.org/en/latest/setup.html.
Download Mysql for Mac 10.11
Posted by: conwaylareflot1957.blogspot.com
