Results 1 to 2 of 2

Thread: MySQL default path

  1. #1
    Registered Member
    Join Date
    Mar 2012
    Posts
    28
    cPanel Access Level

    Root Administrator

    Default MySQL default path

    The one thing which annoys the hell out of me when it comes to control panels is often they do not use the default paths for anything. Which I guess I wouldn't have to much of a problem with if they would document where those paths are.

    Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    ^ This is the error I'm getting. And I'm guessing I'm getting it because I changed the empty my.cnf file. Why would I want to change the my.cnf file? Because I wanted to import a database and couldn't because I kept getting the classic "database has gone away" message (forget what it actually says, but you get the point).

    So here is my file

    PHP Code:
    # Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208
    # Configuration name server generated for Adam at 2013-02-27 17:22:15

    [mysql]

    # CLIENT #
    port                           3306
    socket                         
    = /var/lib/mysql/data/mysql.sock

    [mysqld]

    # GENERAL #
    user                           mysql
    default_storage_engine         
    InnoDB
    socket                         
    = /var/lib/mysql/data/mysql.sock
    pid_file                       
    = /var/lib/mysql/data/mysql.pid

    # MyISAM #
    key_buffer_size                32M
    myisam_recover                 
    FORCE,BACKUP

    # SAFETY #
    max_allowed_packet             16M
    max_connect_errors             
    1000000

    # DATA STORAGE #
    datadir                        = /var/lib/mysql/data/

    # BINARY LOGGING #
    log_bin                        = /var/lib/mysql/data/mysql-bin
    expire_logs_days               
    14
    sync_binlog                    
    1

    # CACHES AND LIMITS #
    tmp_table_size                 32M
    max_heap_table_size            
    32M
    query_cache_type               
    0
    query_cache_size               
    0
    max_connections                
    500
    thread_cache_size              
    50
    open_files_limit               
    65535
    table_definition_cache         
    4096
    table_open_cache               
    4096

    # INNODB #
    innodb_flush_method            O_DIRECT
    innodb_log_files_in_group      
    2
    innodb_log_file_size           
    128M
    innodb_flush_log_at_trx_commit 
    1
    innodb_file_per_table          
    1
    innodb_buffer_pool_size        
    1456M

    # LOGGING #
    log_error                      = /var/lib/mysql/data/mysql-error.log
    log_queries_not_using_indexes  
    1
    slow_query_log                 
    1
    slow_query_log_file            
    = /var/lib/mysql/data/mysql-slow.log 

  2. #2
    Registered Member arunsv84's Avatar
    Join Date
    Oct 2008
    Location
    127.0.0.1
    Posts
    375
    cPanel Access Level

    Root Administrator

    Default Re: MySQL default path

    Before changing the my.cnf, have you checked the mysql status on server?

    /etc/init.d/mysql status

    Paste the output here...

    Cheers!!!
    Last edited by arunsv84; 03-22-2013 at 09:40 PM.
    [root@linux ~]$ w
    1:00:01 up 28 years 300 days, 22:00, 1 user, Today's status : Fine

Similar Threads

  1. What is the default path to: FFMPEG and MPLAYER
    By DWHS.net in forum General Discussion
    Replies: 4
    Last Post: 10-05-2009, 02:47 AM
  2. default path for ./setup.sh
    By s1llyforyou in forum General Discussion
    Replies: 0
    Last Post: 07-26-2008, 12:23 AM
  3. default path for whm and cpanel
    By s1llyforyou in forum General Discussion
    Replies: 1
    Last Post: 07-22-2008, 02:01 AM
  4. Default path when IP is used
    By webcatal in forum General Discussion
    Replies: 3
    Last Post: 12-06-2003, 05:10 PM
bargain