Download Mysql for Mac 10.11.6 Updated

Download Mysql for Mac 10.11.6

Print Friendly, PDF & Email

A few months ago, I wrote most how to install MySQL on Windows with IIS. At present I want to show you how to create an AMP spider web programming stack (Apache, KySQL & PHP) on Mac Os Ten. As with Windows, yous could but get with a ready-fabricated development surroundings like MAMP but, if you're going to be doing real database and web design work with MySQL, information technology's best to know how everything works.

Background

For this demonstration, I'one thousand going to be using Mac OS X El Capitan (five.ten.11), the latest version as of this writing.  My installation surroundings is a hosted Mac server with 1 GB of RAM and 40 GB of deejay space. I will exist demonstrating the procedure using the Concluding commands.

Dissimilar Windows, OS 10 already includes the Apache web server and PHP language pre-installed so it's a much simpler process to ensure that everything is working together. Y'all volition need root access in order to install and configure the components.

Establishing Root Admission

Open the Terminal environment from the Utilities (Get >> Utilities from summit card and then select Terminal).

In Os X, it is possible to get root access by activating the root user account with dsenableroot. Improper use of this command can open your system to security issues, however. It'south safer to use sudo (southwarduperuser 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-u.s.a./HT204012.

Activating Apache

Yous can activate Apache simply by issuing either of the the following commands in the Last.

sudo apachectl showtime
sudo apachectl restart

The restart command will starting time Apache even if it's stopped.  There won't exist any notification on the command line as to the change in condition so you will need to verify that Apache is working by opening a spider web browser window and navigating to the following address:

http://localhost

If everything is working, you should go a elementary white screen with the heading "It works!" indicating that the web server is up and running.

Mac OS X Apache confirmation screen
You can decide if Apache is running on Bone 10 by navigating to http://localhost.

Configuring PHP and Apache

The Apache configuration file (httpd.conf) must exist changed to load the necessary PHP module so that PHP pages tin exist served upwardly.  This is easily done from the Terminal. Showtime, you volition need to change to the Apache directory and you should brand a backup of the file.

cd /etc/apache2/ cp httpd.conf httpd.conf.bak

To edit the file, you can use the command line editor six or the Mac TextEdit programme, either of which tin be opened from the Terminal.

half-dozen httpd.conf
open -a TextEdit httpd.conf

If you're non familiar with vi (pronounced "vee-eye"), it's a powerful command-line editor mutual to UNIX-based systems and you tin can read more about using it on the Academy of Washington'southward site athttps://www.washington.edu/computing/unix/vi.html.  If yous cull the TextEdit command from above, the TextEdit program will open outside the Terminal and will load the configuration file for you lot to work with.

In either editor, y'all'll need to detect the following line:

                  #LoadModule php5_module libexec/apache2/libphp5.so                

Remove the hashtag (#) from the get-go of the line to un-annotate it and and so save the file. You will then need to restart Apache with the following command.

sudo apachectl restart

To verify that PHP is working with Apache, y'all can create a phpinfo.php file in the web document root folder where the localhost files reside. On Bone X, this folder is more often than not \Library\WebServer\Documents.  Create a elementary text file in that folder with the post-obit text on the first line:

<?php phpinfo(); ?>

Save the file with the proper noun phpinfo.php and and then load the file in your spider web browser.

http://localhost/phpinfo.php

If everything is working, you should then get the PHP settings screen.

PHP configuration page in Safari.
Creating a PHPInfo.php file to display the configuration folio is a standard manner of testing PHP.

Article continues after ad


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 image that can exist mounted as a drive attainable from your Desktop.

DMG image file mounted and opened to show MySQL PKG file.
MySQL Community Server can be downloaded from the MySQL site as a DMG image file.

The paradigm file contains a single PKG file which you can double-click to run the installation wizard. Every bit of this writing, the latest version, 5.7.11 is labeled for Bone 10 ten.10 simply I was able to install it with no problems on El Capitan (10.11). During the installation, you lot volition be asked to create a password for the root MySQL user – make sure to write this  password downwardly somewhere safe!

After the installation is finished, it's a good idea to add the MySQL program directory to your PATH statement and so you tin can run information technology from whatever directory. Employ the following line in the Last to do this.

                  export PATH=/usr/local/mysql/bin:$PATH                

Then, try logging in to your new MySQL server as the root user.

mysql -u root -p
A MySQL login and exit in the Mac OS X Terminal
Logging in to and exiting from MySQL.

It's also a practiced idea to run mysql_secure_installation which does the following to secure your database server:

  1. Enables you to modify the root password that was chosen during installation.
  2. Provides the selection to remove the anonymous MySQL user.
  3. Provides the option to disable remote logins.
  4. Allows you to remove the examination database and access to it.
  5. Reload the privilege tables

Now that MySQL is working, information technology needs to exist able to work with PHP. This is done past creating a link to the MySQL socket file which will let PHP to communicate with the server. Entering the following commands in the Final will create a new MySQL directory in the system 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 be able to Admission the MySQL preference pane shown in Effigy 2.11 from the System Preferences console. This pane enables you to starting time and stop your MySQL server and set up information technology to start when the OS starts up.

Installing the Design Tools

You lot probably won't want to manage all of your databases from the Terminal 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 as a DMG image file. Installing Workbench is equally simple as opening the mounted DMG epitome and dragging the MySQL Workbench icon to the Applications folder when prompted. You will then be able to run the program from your Applications folder.

Installation screen for MySQL Workbench
Installation of MySQL Workbench

PHPMyAdmin

As a PHP application, PHPMyAdmin can also be installed within your new AMP environment, regardless of the operating system.

  1. Download the latest version from PHPMyAdmin.net. The packet is available in ZIP format.
  2. UnZIP the files to a PHPMyAdmin subdirectory nether your Localhost folder, usually \Library\WebServer\Documents.
  3. Copy the config.sample.inc.php file to config.inc.php and open the new file for editing.
  4. Look for the line that starts with $cfg [ 'blowfish_secret' ] = and add an encryption value of your pick. This value can be a series of random letters and numbers if yous like.

If yous would similar to accept a default user and password for phpMyAdmin, you tin can add the following lines to the $cfg['Servers'] section of the file, substituting your own values for the user name and countersign.

                  $cfg                  [                  'Servers'                  ][                  $i                  ][                  'user'                  ]                  =                  '<username>'                  ;                  $cfg                  [                  'Servers'                  ][                  $i                  ][                  'countersign'                  ]                  =                  '<countersign>'                  ;                

Once this is done, you should be able to run PHPMyAdmin simply by navigating to http://localhost/PHPMyAdmin.

For more than information on installing PHPMyAdmin, see the documentation athttps://phpmyadmin.readthedocs.org/en/latest/setup.html.

Download Mysql for Mac 10.11.6

Posted by: jamesdiden1975.blogspot.com

0 Komentar

Post a Comment




banner