Install MYSQL and osmysql on MAC OS X
I found an article on the Internet, which is really an artifact.
You can find it at the beginning by using brew search mysql... and follow the prompts to install it step by step. The final result is that it cannot be started, and a sock-related error is always prompted ..
Later I went directly to the mysql official website to download the mysql-5.5.17-osx10.6-x86_64.dmg for MAC Platform
3 files are found after opening. installation sequence:
1. Mysql-5.5.17-osx10.6-x86_64.pkg Database
2. MySQLStartupItem. pkg so that MySQL will automatically start at startup.
3. MySQL. prefPane will see the ICON "MySQL" in "system setting Preferences", through which you can set whether MySQL starts or stops and whether it runs automatically at startup. MySQL is basically installed.
Run "sudo vi/etc/bashrc" and add the alias of mysql and mysqladmin to the bash configuration file.
# Mysql
Alias mysql = '/usr/local/mysql/bin/mysql'
Alias mysqladmin = '/usr/local/mysql/bin/mysqladmin'
In this way, you can perform operations through commands in the terminal. For example, after installation, the default MySQL root Password is blank, to set the password, Run "mysqladmin-u root password" mysqlpassword "on the terminal. mysqlpassword is the root password.
Note: If you use PHP to connect to MySQL, the error "Can't connect to local MySQL server through socket"/var/mysql may be reported. sock ', or use localhost to connect to MySQL and 127.0.0.1 is required because/var/mysql/MySQL is used by default in php connection. sock, but MYSQL of MAC version changes the file location, put it under/tmp. The solution is to modify php. ini as follows:
Mysql. default_socket =/tmp/mysql. sock
The above is not a nonsense and I really admire it!
How to install MySQL in Mac OS X?
Go to MYSQL.com to download the version of the system, and then install
Dev.mysql.com/..n.html
How to install MySQL in Mac OS X?
I am not sure about this. You can search Baidu.