Install MySQL on Mac OS x system

Source: Internet
Author: User

For the sake of faking (stop the game), get a Mac MINI

OS x System version is 10.10.1 (14B25)

I java farming a piece, usually work is with Oracle, but their practiced hand are all with MySQL, so the general own machine will have MySQL and Oracle (seemingly now OS X can also install Oracle, I heard it will be very frustrating)

As the environment builds up, MySQL will be installed today

Apart to the Oracle website to find MySQL and download,

The latest download for today's official website is Mac OS X 10.9 (x86, 64-bit), MySQL version 5.6.22

For a Java farmer like me, there may be a version incompatibility problem, but the official website only this latest, can only download and install

Download the DMG file after installation, with the MySQL command to see if you can connect,

The result is an error, as follows:

ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/tmp/mysql.sock ' (2)

OK, the error code is good to do, decisive degree Niang,

Summarize the online various statements, mainly have the following points:

1,/tmp/mysql.sock does not have this file, in the MY.CNF [mysqld] Add the previous sentence

Socket =/tmp/mysql.sock on the line

2, the system user does not operate the/TMP directory permissions, resulting in Mysql.sock not created successfully

Well, in fact, after installation, even the MY.CNF files are not!

I also suspect that is not the version of the problem, compare my system version with the MySQL version of the wrong

Also degree Niang a bit, also some people say in OS X 10.10 version installs the problem, ask is not certain corresponding version only line ~ ~ ~

Results Some people suggest to install with homebrew (homebrew is what, oneself degree Niang bar)

In this way, I will install the MySQL folder all RM off (in fact, I do not know whether it is clean, but also on-line search),

Installing MySQL with homebrew

After installation run or report just the wrong, I have a go ~

That can only see if TMP is insufficient permissions, the problem with the my.cnf file

Anyway is toss, when the yard farm will have to toss the consciousness

Permissions and my.cnf files are all built, but still report that mistake.

Restart MySQL Chant

Mysqld Stop stop service, the print display is as follows:

There is such a sentence:

' Federated ' is disabled

Online search, said in the MY.CNF [mysqld] Under Add a sentence federated on it can

Plus post MySQL start print information as follows:

Now the ' federated ' is disabled has gone, but there is a warning:

Setting lower_case_table_names=2 because file system for/usr/local/var/mysql/is case insensitive

Search the Internet, no results,

Zoom in and reload MySQL

This reload step is as follows:

Run command: Brew uninstall MySQL

Print:

uninstalling/usr/local/cellar/mysql/5.6.22 ...

Then

Brew Install MySQL

In this way, it succeeds ... (somewhat baffling)

Finally, to summarize,

First, the official website after installation, is not generated my.cnf files, no this file, online said can build themselves, and I in/etc with/usr/local/etc below are established,

Specifically I installed MySQL read that file, I did not study carefully

Second, after the establishment of MY.CNF, it is estimated to reload MySQL once.

Of course, the small partners in OS X installed under the situation is not the same as me, this has the wrong information or can be searched on the internet

After the Bo ~ ~ ~

Install MySQL on Mac OS x system

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.