1 | [mysqld] |
2 | socket=/usr/local/var/mysql.sock |
3 | [client] |
4 | socket=/usr/local/var/mysql.sock |
1 | chmod +t /tmp |
1 | chown -R mysql:mysql /var/lib/mysql |
2 | /etc/init.d/mysqld start |
3 | 启动 MySQL: [ 确定 ] |
4 | mysql -u root -p |
1 | chown -R mysql:mysql /var/lib/mysql |
1 | /etc/init.d/mysql start |
01 | [mysqld] |
02 | datadir=/usr/local/mysql/data |
03 | socket=/var/lib/mysql/mysql.sock |
04 |
05 | [mysql.server] |
06 | user=mysql |
07 | basedir=/usr/local/mysql |
08 |
09 | If there is not currently a section called [client], add one at the bottom of the file and copy the socket= line under the [mysqld] section such as: |
10 |
11 | [client] |
12 | socket=/var/lib/mysql/mysql.sock |
1 | ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock |
欢迎光临 PHP开发笔记 (http://phpvi.com/) | Powered by Discuz! 6.1.0 |