美文网首页
linxu-mysql 启动找不到mysql.socket

linxu-mysql 启动找不到mysql.socket

作者: 邵云涛 | 来源:发表于2018-06-08 09:24 被阅读17次

    百度网上各种教程百思不得其解,最后找到我们数据库大神解决点

    添加一下几行配置

    socket= /tmp/mysql.sock 
    lower_case_table_names = 1
    max_connections=1000
    wait_timeout=86400
    interactive_timeout=31536000
    sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
    slow_query_log = on 
    slow-query-log-file = /mydata/mysql-5.6.36/data/mysql-slow.log 
    long_query_time = 2
    

    上配置文件my.cnf
    配置后的文件内容如下:

    # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
    # innodb_buffer_pool_size = 128M
    
    # Remove leading # to turn on a very important data integrity option: logging
    # changes to the binary log between backups.
    # log_bin
    
    # These are commonly set, remove the # and set as required.
    basedir = /mydata/mysql-5.6.36
    datadir = /mydata/mysql-5.6.36/data/mysql
    lower_case_table_names=1
    # port = .....
    # server_id = .....
    # socket = ....
    socket=/tmp/mysql.sock 
    
    # Remove leading # to set options mainly useful for reporting servers.
    # The server defaults are faster for transactions and fast SELECTs.
    # Adjust sizes as needed, experiment to find the optimal values.
    # join_buffer_size = 128M
    # sort_buffer_size = 2M
    # read_rnd_buffer_size = 2M 
    lower_case_table_names = 1
    max_connections=1000
    wait_timeout=86400
    interactive_timeout=31536000
    sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
    slow_query_log = on 
    slow-query-log-file = /mydata/mysql-5.6.36/data/mysql-slow.log 
    long_query_time = 2
    

    最后把数据库restart
    完美解决,感谢大神的支援~

    相关文章

      网友评论

          本文标题:linxu-mysql 启动找不到mysql.socket

          本文链接:https://www.haomeiwen.com/subject/tasosftx.html