Home > Database > Mysql Tutorial > mac下安装mysql的方法_MySQL

mac下安装mysql的方法_MySQL

WBOY
Release: 2016-06-02 08:49:54
Original
1109 people have browsed it

1. 执行:

$ brew install mysql
Copy after login

2. 在 /usr/local/etc/ 下创建或修改 my.cnf,示例:

[client]
port = 3306
socket = /tmp/mysql.sock
default-character-set = utf8

[mysqld]
collation-server = utf8_unicode_ci
character-set-server = utf8
init-connect ='SET NAMES utf8'
max_allowed_packet = 64M
bind-address = 127.0.0.1
port = 3306
socket = /tmp/mysql.sock
innodb_file_per_table=1

[mysqld_safe]
timezone = '+0:00'
Copy after login

3. 然后就可以指向 mysql.server start 来启动了

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template