MySQL for Mac installation

Source: Internet
Author: User

1. Implementation:
$ brew Install MySQL

2. /usr/local/etc/ under Create or modify mysql.conf, example:

[Client]port = 3306socket =/tmp/mysql.sockdefault-character-set = Utf8[mysqld]collation-server = Utf8_unicode_ Cicharacter-set-server = Utf8init-connect = ' Set NAMES UTF8 ' max_allowed_packet = 64mbind-address = 127.0.0.1port = 3306soc Ket =/tmp/mysql.sockinnodb_file_per_table=1[mysqld_safe]timezone = ' +0:00 '

3. Like after the installation of MySQL, he will prompt you to init database, and provide the following two sentences let you execute, it is possible that you did not execute these two sentences

$ unset tmpdir$ mysql_install_db--verbose--user= ' WhoAmI '--basedir= "$ (brew--prefix MySQL)"--datadir=/usr/local/var/ MySQL--tmpdir=/tmp

4. Then you can point mysql.server start to start, for security, you can also execute the Security Settings Wizard, follow the prompts step by step configuration

$ mysql_secure_installation

MySQL for Mac installation

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.