Question:
Starting MySQL. ERROR! The server quit without updating PID file
Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (38)
这是我的MySQL配置,本来因为要远程访问MySQL,结果不能连上远程的MySQL服务器,然后就怀疑是MySQL的配置出了问题,所以就改配置,
第一次更改配置文件后,使用本地的mysql工具都不能登陆了,出现下边这个问题:
Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (38)
这是第一次修改的情景,
1 # For advice on how to change settings please see
2 # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
3
4 [mysqld]
5
6 # Remove leading # and set to the amount of RAM for the most important data
7 # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
8 # innodb_buffer_pool_size = 128M
9
10 # Remove leading # to turn on a very important data integrity option: logging
11 # changes to the binary log between backups.
12 # log_bin
13
14 # These are commonly set, remove the # and set as required.
15 basedir = /usr/local/mysql
16 datadir = /usr/local/mysql/data
17 port = 3306
18 server_id = 1
19 socket = /tmp/mysql.sock
20 max_connections = 1000
21 default-character-set=utf8
22 # Remove leading # to set options mainly useful for reporting servers.
23 # The server defaults are faster for transactions and fast SELECTs.
24 # Adjust sizes as needed, experiment to find the optimal values.
25 # join_buffer_size = 128M
26 # sort_buffer_size = 2M
27 # read_rnd_buffer_size = 2M
28
29 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
第二次更改配置后连MySQL server都启动不了了,我............................琢磨了很久
Starting MySQL. ERROR! The server quit without updating PID file(cant update locahost.localdomain.pid)
这次修改:
1 # For advice on how to change settings please see
2 # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
3
4 [mysqld]
5
6 # Remove leading # and set to the amount of RAM for the most important data
7 # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
8 # innodb_buffer_pool_size = 128M
9
10 # Remove leading # to turn on a very important data integrity option: logging
11 # changes to the binary log between backups.
12 # log_bin
13
14 # These are commonly set, remove the # and set as required.
15 basedir = /usr/local/mysql
16 datadir = /usr/local/mysql/data
17 port = 3306
18 # server_id = 1
19 # socket = /tmp/mysql.sock
20 max_connections = 1000
21 default-character-set=utf8
22 # Remove leading # to set options mainly useful for reporting servers.
23 # The server defaults are faster for transactions and fast SELECTs.
24 # Adjust sizes as needed, experiment to find the optimal values.
25 # join_buffer_size = 128M
26 # sort_buffer_size = 2M
27 # read_rnd_buffer_size = 2M
28
29 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
本以为 max_connections = 1000 和default-character-set=utf8两处没什么问题,结果是MySQL还是不能启动
最后我还是放弃一切修改,恢复到原来最初的位置,又回到了出发点
1 # For advice on how to change settings please see
2 # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
3
4 [mysqld]
5
6 # Remove leading # and set to the amount of RAM for the most important data
7 # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
8 # innodb_buffer_pool_size = 128M
9
10 # Remove leading # to turn on a very important data integrity option: logging
11 # changes to the binary log between backups.
12 # log_bin
13
14 # These are commonly set, remove the # and set as required.
15 basedir = /usr/local/mysql
16 datadir = /usr/local/mysql/data
17 port = 3306
18 # server_id = 1
19 # socket = /tmp/mysql.sock
20 # max_connections = 1000
21 # default-character-set=utf8
22 # Remove leading # to set options mainly useful for reporting servers.
23 # The server defaults are faster for transactions and fast SELECTs.
24 # Adjust sizes as needed, experiment to find the optimal values.
25 # join_buffer_size = 128M
26 # sort_buffer_size = 2M
27 # read_rnd_buffer_size = 2M
28
29 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
突然想起来MySQL的用户管理和用户权限设置,然后就是MySQL的用户管理创建一个新的远程用户,通过本机客户端软件是可以连接的,success!