Learn about Centmin Mod LEMP Stack today
Become a Member

Install MariaDB mysql.sock No such file or directory error

Discussion in 'Install & Upgrades or Pre-Install Questions' started by abakisensoy, Jan 19, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    4:09 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    nginx and php failed to install so yours is a different problem so start a separate thread in https://community.centminmod.com/forums/install-upgrades-or-pre-install-questions.8/ and post the errors and specifics :)

     
  2. abakisensoy

    abakisensoy Member

    49
    3
    8
    Dec 2, 2016
    Ratings:
    +3
    Local Time:
    4:09 PM
    latest
    5.5

    i get t his :
    Code:
    mysqlrestart
     ERROR! MySQL server PID file could not be found!
    Starting MySQL.170119 09:36:15 mysqld_safe Logging to '/var/log/mysqld.log'.
    170119 09:36:15 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    /usr/bin/mysqld_safe_helper: Can't create/write to file '/var/log/mysqld.log' (Errcode: 13 "Permission denied")
     ERROR!
    
     
  3. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    4:09 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    what does your contents of /etc/my.cnf look like now ?
    Code (Text):
    cat /etc/my.cnf
    
     
  4. abakisensoy

    abakisensoy Member

    49
    3
    8
    Dec 2, 2016
    Ratings:
    +3
    Local Time:
    4:09 PM
    latest
    5.5

    Code:
    cat /etc/my.cnf
    [mysqld]
    local-infile=0
    ignore-db-dir=lost+found
    #character-set-server=utf8
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    
    # bind-address=185.85.238.70
    # optimized my.cnf for MariaDB 5.5.x
    # by eva2000
    # vbtechsupport.com
    
    tmpdir=/home/mysqltmp
    
    innodb=ON
    #skip-federated
    #skip-pbxt
    #skip-pbxt_statistics
    #skip-archive
    #skip-name-resolve
    #old_passwords
    back_log = 75
    max_connections = 300
    key_buffer_size = 32M
    myisam_sort_buffer_size = 32M
    myisam_max_sort_file_size = 2048M
    join_buffer_size = 128K
    read_buffer_size = 128K
    sort_buffer_size = 256K
    table_definition_cache = 4096
    table_open_cache = 2048
    thread_cache_size = 64
    wait_timeout = 1800
    connect_timeout = 10
    tmp_table_size = 32M
    max_heap_table_size = 32M
    max_allowed_packet = 32M
    max_seeks_for_key = 1000
    group_concat_max_len = 1024
    max_length_for_sort_data = 1024
    net_buffer_length = 16384
    max_connect_errors = 100000
    concurrent_insert = 2
    read_rnd_buffer_size = 256K
    bulk_insert_buffer_size = 8M
    query_cache_limit = 512K
    query_cache_size = 16M
    query_cache_type = 1
    query_cache_min_res_unit = 2K
    query_prealloc_size = 262144
    query_alloc_block_size = 65536
    transaction_alloc_block_size = 8192
    transaction_prealloc_size = 4096
    default-storage-engine = InnoDB
    
    log_warnings=1
    slow_query_log=0
    long_query_time=1
    slow_query_log_file=/var/lib/mysql/slowq.log
    #log-error=/var/log/mysqld.log
    
    # innodb settings
    innodb_large_prefix=1
    innodb_purge_threads=1
    innodb_file_format = Barracuda
    innodb_file_per_table = 1
    innodb_open_files = 1000
    innodb_data_file_path= ibdata1:10M:autoextend
    innodb_buffer_pool_size = 48M
    
    ## https://mariadb.com/kb/en/mariadb/xtradbinnodb-server-system-variables/#innod                                                                                                             b_buffer_pool_instances
    #innodb_buffer_pool_instances=2
    
    innodb_log_files_in_group = 2
    innodb_log_file_size = 128M
    innodb_log_buffer_size = 8M
    innodb_flush_log_at_trx_commit = 2
    innodb_thread_concurrency = 0
    innodb_lock_wait_timeout=50
    innodb_flush_method = O_DIRECT
    innodb_support_xa=1
    
    # 200 * # DISKS
    innodb_io_capacity = 100
    innodb_read_io_threads = 2
    innodb_write_io_threads = 2
    
    # mariadb settings
    [mariadb]
    #thread-handling = pool-of-threads
    #thread-pool-size= 20
    #mysql --port=3307 --protocol=tcp
    #extra-port=3307
    #extra-max-connections=1
    
    userstat = 0
    key_cache_segments = 1
    aria_group_commit = none
    aria_group_commit_interval = 0
    aria_log_file_size = 32M
    aria_log_purge_type = immediate
    aria_pagecache_buffer_size = 8M
    aria_sort_buffer_size = 8M
    
    [mariadb-5.5]
    #ignore_db_dirs=
    query_cache_strip_comments=0
    
    innodb_read_ahead = linear
    innodb_adaptive_flushing_method = estimate
    innodb_flush_neighbor_pages = 1
    innodb_stats_update_need_lock = 0
    innodb_log_block_size = 512
    
    log_slow_filter =admin,filesort,filesort_on_disk,full_join,full_scan,query_cache                                                                                                             ,query_cache_miss,tmp_table,tmp_table_on_disk
    
    [mysqld_safe]
    socket=/var/lib/mysql/mysql.sock
    log-error=/var/log/mysqld.log
    #nice = -5
    open-files-limit = 8192
    
    [mysqldump]
    quick
    max_allowed_packet = 32M
    
    [myisamchk]
    tmpdir=/home/mysqltmp
    key_buffer = 32M
    sort_buffer = 16M
    read_buffer = 16M
    write_buffer = 16M
    
    [mysqlhotcopy]
    interactive-timeout
    
    [mariadb-10.0]
    # 2 variables needed to switch from XtraDB to InnoDB plugins
    #plugin-load=ha_innodb
    #ignore_builtin_innodb
    
    ## MariaDB 10 only save and restore buffer pool pages
    ## warm up InnoDB buffer pool on server restarts
    innodb_buffer_pool_dump_at_shutdown=1
    innodb_buffer_pool_load_at_startup=1
    innodb_buffer_pool_populate=0
    ## Disabled settings
    performance_schema=OFF
    innodb_stats_on_metadata=OFF
    innodb_sort_buffer_size=2M
    innodb_online_alter_log_max_size=128M
    query_cache_strip_comments=0
    log_slow_filter =admin,filesort,filesort_on_disk,full_join,full_scan,query_cache                                                                                                             ,query_cache_miss,tmp_table,tmp_table_on_disk
    
     
  5. abakisensoy

    abakisensoy Member

    49
    3
    8
    Dec 2, 2016
    Ratings:
    +3
    Local Time:
    4:09 PM
    latest
    5.5
    i noticed that there is another log-error under [mysqld_safe] so i comment that and it worked.

    [mysqld_safe]
    log-error=/var/log/mysqld.log

    what is the real problem here ? mariadb bug ? how can we fix it without doing workaround..
     
  6. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    4:09 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    yeah was about to say 2nd instance of log-error=/var/log/mysqld.log

    problem is probably selinux still as you had it enabled originally

    did you reboot server and verify selinux is disabled ?
     
  7. abakisensoy

    abakisensoy Member

    49
    3
    8
    Dec 2, 2016
    Ratings:
    +3
    Local Time:
    4:09 PM
    latest
    5.5

    yes reboot and verified that selinux is indeed disabled. what next :)
     
  8. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    4:09 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    probably need to dig about mariadb bug tracker/jira to see if it's a reported bug yet System Dashboard - JIRA
     
  9. abakisensoy

    abakisensoy Member

    49
    3
    8
    Dec 2, 2016
    Ratings:
    +3
    Local Time:
    4:09 PM
    latest
    5.5
    i setup another VDS and install centminmod again. Still getting same error. Selunix is disabled so it must be another problem.

    this article How To Fix MariaDB 10.0.29 SELinux Update Failure realted selinux so eventhoug we disabled selunix still having problem.
     
  10. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    4:09 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    does it happen if you install 123.09beta01 ?

    Code (Text):
    yum -y update; curl -O https://centminmod.com/betainstaller.sh && chmod 0700 betainstaller.sh && bash betainstaller.sh
     
  11. abakisensoy

    abakisensoy Member

    49
    3
    8
    Dec 2, 2016
    Ratings:
    +3
    Local Time:
    4:09 PM
    latest
    5.5
    didnt try yet. what are the differences ?

    should i set up another vds and try ?
     
  12. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    4:09 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    123.09beta01 is 18+ months of development, improvements and performance over 123.08stable see change log at Change Log - CentminMod.com LEMP Nginx web stack for CentOS and 123.09beta01 is almost going stable just need to update and write all official centminmod.com site updated documentation for 123.09stable :)

    123.09beta01 defaults to MariaDB 10.1 branch vs 123.08stable defaults to MariaDB 10.0 branch
     
  13. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    4:09 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    ah ha, confirmed just did a fresh 123.08stable centos 6.8 64bit install and got same error - suspsect it's mariadb 10.0.29 specific
    Code (Text):
    Shutting down MySQL.. SUCCESS! 
    Starting MySQL.170119 12:03:11 mysqld_safe Logging to '/var/log/mysqld.log'.
    170119 12:03:11 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    /usr/bin/mysqld_safe_helper: Can't create/write to file '/var/log/mysqld.log' (Errcode: 13 "Permission denied")
     ERROR! 
    service mysql stop
     ERROR! MySQL server PID file could not be found!
    service mysql start
    Starting MySQL.170119 12:03:13 mysqld_safe Logging to '/var/log/mysqld.log'.
    170119 12:03:13 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    /usr/bin/mysqld_safe_helper: Can't create/write to file '/var/log/mysqld.log' (Errcode: 13 "Permission denied")
     ERROR! 
    

    test on my usual local virtualbox centos 6.8 instance, so definitely know selinux is disabled
     
  14. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    4:09 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Last edited: Jan 19, 2017
  15. abakisensoy

    abakisensoy Member

    49
    3
    8
    Dec 2, 2016
    Ratings:
    +3
    Local Time:
    4:09 PM
    latest
    5.5
    whenever i start use centos get different kind of bugs :( . im installing beta centminmod now
     
  16. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    4:09 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    seems affects MariaDB 10.1.21 in 123.09beta01 too on CentOS 6.8 64bit only ! CentOS 7.3 64bit looks okay for MariaDB 10.1.21
    Code (Text):
    Starting MySQL.170119 13:00:03 mysqld_safe Logging to '/var/log/mysqld.log'.
    170119 13:00:04 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    /usr/bin/mysqld_safe_helper: Can't create/write to file '/var/log/mysqld.log' (Errcode: 13 "Permission denied")
     ERROR!
     ERROR! Failed to restart server

    so same workaround for now is to edit /etc/my.cnf and comment out with a hash # inf ront the 2 instances of
    Code (Text):
    #log-error=/var/log/mysqld.log
    
     
  17. abakisensoy

    abakisensoy Member

    49
    3
    8
    Dec 2, 2016
    Ratings:
    +3
    Local Time:
    4:09 PM
    latest
    5.5
    yes i can confirm that too : using
    Centmin Mod Menu 123.09beta01 centminmod.com
    on centos 6.8 64bit
    same error :)

    should i switch to CentOS 7.3 ?
     
  18. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    4:09 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    yeah you should if you don't want to wait for the official fixes
     
  19. reallove0810

    reallove0810 New Member

    25
    10
    3
    Jan 3, 2015
    Ratings:
    +11
    Local Time:
    8:09 AM
    1.7.9
    5.5.41
    I've just found a solution and tested ^^ (CentOs 6.8 - 64bit)
    Follow this method to install
    Code (Text):
    branchname=123.08stable
    wget -O /usr/local/src/${branchname}.zip https://github.com/centminmod/centminmod/archive/${branchname}.zip
    cd /usr/local/src
    unzip ${branchname}.zip
    mv centminmod-${branchname} centminmod
    cd centminmod
    chmod +x centmin.sh
    ./centmin.sh

    But BEFORE you run ./centmin.sh, you have to edit this file /usr/local/src/centminmod/inc/mariadb_install.inc
    Change all baseurl from 10.0 to 10.0.27 (Install MariaDB 10.0.27 instead of 10.0.29). You can also download it here
    mariadb_install.inc ยท GitHub
    Now run ./centmin.sh and wait ^^


    If you have problem with the newest version of centmin.sh. You can try this version (nginx 1.11.5 default)
    GitHub - centminmod/centminmod at 6e96f6cadb8d6a3041fc572e0181c5ea2edd8e9a
    When install finished, please check php-fpm (service php-fpm restart)
    If it shows
    Code (Text):
    Starting php-fpm [19-Jan-2017 21:49:13] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20121212/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20121212/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0

    Then you have to install Image ImagicK
    Code (Text):
    yum install -y ImageMagick ImageMagick-devel

    And then go to centminmod menu => select option 15 to Install/Reinstall ImagicK PHP Extension
     
    Last edited: Jan 20, 2017