Scene: Install the binaries of MySQL 5.6 under Mac OSX 10.10.
Environment: binary files for Mac OSX 10.10, MySQL 5.6 or 5.6
Steps: [All directories, please take it from the root “/” directory, so as not to make the list, can’t find the directory]
1, download mysql 5.6 binaries
Download address: http://dev.mysql.com/downloads/mysql/
Download: mysql-5.6.24-osx10.9-x86_64.tar.gz binary bag, or 5.7 binary bag
2, unzip file package to your installation directory
$: tar -xf mysql-5.6.24-OSX10.9-x86_64.tar.gz
3, CD to MySQL root “Decompression Directory], modify directory and file permissions [as needed]
4, initialize mysql
– 5.7.16 Previous version
$: ./scripts/mysql_install_db
– 5.7.16 after the version
./bin/mysqld –initialize –user = mysql –Basedir = [binary installation directory file root directory] –DATADIR = [set data file directory]
At this point, a My.cnf file is generated under your root directory [5.7 This file is not generated, you need to go to new], the installation directory is not “/ usr / local / mysql”, you need to use this file to configure Your mysql.
—– Linux system Find this My.cnf file in order below
/etc/my.cnf Global Options
/etc/mysql/my.cnf Global Options (as of mysql 5.1.15)
Sysconfdir / my.cnf global options
$ Mysql_home / my.cnf server-specific options
Defaults-extra-file the file specified with – defaults-extra-file = path
~ / my.cnf user-specific options
—- Mac system will look up under / etc, so you need to copy this my.cnf file to / etc.
MY.CNF main configuration briefly:
Basedir = [MySQL installation path]
DataDir = [mysql installation path] / data [Database file path, data when the initialization is initialized under root directory / data, if you specify whether it is not the same directory, you need to copy the initialized data file]
Socket = mysql5.6dir / tmp / mysql.sock [data connection file]
[Note the mysql.sock file is generated after mysql startup, and this file will be removed when turning off mysql]
5, start and stop MySQL service
5.1, start:
method one:
$ ./bin/mysqld_safe
Method Two:
$: ./Support-files/mysql.server start
5.2, stop
$: ./Support-files/mysql.server stop
Note: When using the mysql.server script, first add: basedir = mysql5.6dir
When Support-files / mysql.server start, he will still go to mysql5.6dir / bin / mysqld_safe, so the configuration in mysql5.6dir / my.cnf is still valid; so it has been set in Support-files / mysql.server. When the directory is available, you can build my.cnf in / etc directory.
MySQL default users are root, password is empty, you can change your password after installation is complete, please refer to the mysql operation instruction.
Note: Connection login mysql If an error, please refer to Blog post:
Http://binary-space.iteye.com/blog/2412768
————————————————— ——————
If there is any other condensation or in the article, please point out in time,
I am better corrected in time, and we will make us progress together.
Email: [email protected]
QQ: 1035862795
Knocking on the door: Code writes life