Apple Mac OS X under tar.gz Way Install MySQL

Source: Internet
Author: User
Tags gz file mysql download
On the MAC system, install MySQL Server is usually with DMG package in the graphical interface under the prompt installation, in addition to MySQL also provides the compressed TAR Archive binary Package installation mode, that is, free installation decompression run version, compared to the DMG package, free installation Version of the process is more concise, pure command-line operation, more in line with the code guests Toss spirit.

System environment: OS X Yosemite 10.10.3 Login User: wid (with sudo permission) MySQL version: 5.6.24 (mysql-5.6.24-osx10.9-x86_64.tar.gz) mysql Download: http://dev.m ysql.com/downloads/mysql/

Find the downloaded MySQL tar.gz file location, the browser download general in the current user's Downloads directory, that is/users/<yourname>/downloads, into the terminal, unzip tar.gz file:

Cd/users/<yourname>/downloadstar ZXVF mysql-5.6.24-osx10.9-x86_64.tar.gz

After extracting the mysql-5.6.24-osx10.9-x86_64 directory, move the extracted directory to the MySQL default installation path/usr/local/mysql,/usr/local path does not exist, first sudo mkdir/usr/loca L Create.

# Move the unpacked binary package to the installation directory sudo mv mysql-5.6.24-osx10.9-x86_64/usr/local/mysql# change the MySQL installation directory to the user group Cd/usr/localsudo chown-r ro Ot:wheel mysql# Perform some default initialization (create default profile, authorization table, etc.) by executing mysql_install_db script in scripts directory Cd/usr/local/mysqlsudo Scripts/mysql_ install_db--user=mysql

Installation 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

Initializing the MySQL root password

Cd/usr/local/mysql/bin./mysqladmin-u Root Password <your-password>

Connect to the database via your own MySQL Client

Cd/usr/local/mysql/bin./mysql-u root-p<your-password>
  • 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.