I found an article on the internet, it is almost an artifact.
Just started with brew search MySQL ... Can find, follow the prompts step-by-step installation, the result is not start up, the old hint of a sock related errors.
Later, I went directly to the MySQL website to download the MYSQL-5.5.17-OSX10.6-X86_64.DMG for the Mac platform
3 files found after opening, order of installation:
1. MYSQL-5.5.17-OSX10.6-X86_64.PKG Database
2. Mysqlstartupitem.pkg this way, MySQL automatically starts automatically when it is powered on.
3. Mysql.prefpane this will be in the "system Preferences" to see the name "MySQL" icon, through which you can set MySQL to start or stop, and whether the boot automatically run. MySQL is basically installed here.
Add MySQL and mysqladmin aliases to bash's configuration file by running "sudo vi/etc/bashrc"
Alias mysql= '/usr/local/mysql/bin/mysql '
Alias mysqladmin= '/usr/local/mysql/bin/mysqladmin '
This can be more simple in the terminal through the command to do the appropriate operation, such as after the installation of the MySQL root default password is empty, if you want to set the password can run in the terminal "Mysqladmin-u root password" Mysqlpassword "" to set, Where Mysqlpassword is the password of root.
Note: Using PHP to connect MySQL may error "can" T connect to the local MySQL server through socket '/var/mysql/mysql.sock ', Or use localhost cannot connect MySQL and need 127.0.0.1, because the connection time PHP default to find/var/mysql/mysql.sock, but the Mac version of MySQL changed the location of the file, placed in/tmp. The approach is to modify the php.ini as follows:
Above said, did not have a nonsense, very admire!