Install mysql5.6.26 _ MySQL on macos10.10.4

Source: Internet
Author: User
On Mac systems, MySQL is usually installed with a DMG package on the graphical interface as prompted. In addition, MySQL also provides the CompressedTARArchive binary package installation method, that is, no installation or decompression of the running version, compared with the DMG package, the free installation version is installed on the Mac system. MySQL Server is usually installed with the DMG package on the graphical interface as Prompted. MySQL also provides the Compressed TAR Archive binary package installation method, that is, the installation-free and decompressed running version is simpler than the DMG package, and the command line-only operation is more in line with the SPOF of the coders.

System environment: OS X Yosemite 10.10.4MySQL version: mysql-5.6.26-osx10.9-x86_64.tar.gzMySQL Download: http://dev.mysql.com/downloads/mysql/

Find the location of the downloaded MySQL tar.gz file, usually in the current user's Downloads Directory, enter the terminal ,.

Decompress the tar.gz file:

cd
cd Download
tar zxvf mysql-5.6.26-osx10.9-x86_64.tar.gz

Move folder location and configuration

Decompress the package and move the folder to the/usr/local path. if the folder does not exist, create sudo mkdir/usr/local first.

# Move the unzipped binary package to the sudo mv mysql-5.6.26-osx10.9-x86_64/usr/local/installation directory/
cd /usr/local
Sudo mv mysql-5.6.26-osx10.9-x86_64 mysql # Modify file name
Sudo chown-R root: wheel mysql # Note: change root to your current user name. Otherwise, the service cannot be started # execute the mysql_install_db script in the scripts directory to complete some Default initialization (create default configuration files, authorization tables, etc) cd/usr/local/mysqlsudo scripts/mysql_install_db -- user = mysql

Installation is complete. Test start, restart, and stop:

Cd/usr/local/mysql # start sudo support-files/mysql. server start # restart sudo support-files/mysql. server restart # stop sudo support-files/mysql. server stop
Initialize the MySQL root password
cd /usr/local/mysql/bin./mysqladmin -u root password 
 
Connect to the database through the built-in MySQL Client
cd /usr/local/mysql/bin./mysql -u root -p

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.