Hi All ,
I have installed Mysql in Linux for Bugzilla configuration .
Then I stopped Mysql and put my.cnf configuration file in etc folder .
Now when I am trying to restart Mysql it gave the below error .
*[sabhijit@cr-beaodi-01 ~]$ /home/sabhijit/mysql/mysql-5.6.3-m6-linux2.6-x86_64/bin/mysql -u root* ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Following is the contents of my.cnf file .
*[mysqld]* socket=/tmp/mysql.sock datadir=/home/sabhijit/mysql/mysql-5.6.3-m6-linux2.6-x86_64/data skip-locking skip-innodb
*# MySQL 4.x has query caching available.*
*# Enable it for vast improvement and it may be all you need to tweak.* query_cache_type=1 query_cache_limit=1M query_cache_size=32M
*# Reduced to 200 as memory will not be enough for 500 connections.*
*# which is now: 64 + (1 + 1) * 200 = 464 MB*
*# max_connections = approx. MaxClients setting in httpd.conf file*
*# Default set to 100.*
*# Reduced wait_timeout to prevent idle clients holding connections.*
*#wait_timeout=30* wait_timeout=15 connect_timeout=10
*# max_connect_errors is set to 10 by default*
*# Checked opened tables and adjusted accordingly after running for a while.* table_cache=512
*#tmp_table_size=32M by default*
*# Reduced it to 32 to prevent memory hogging. Also, see notes below.* thread_cache=32
*# Reduced it by checking current size of *.MYI files, see notes below.* key_buffer=128M
*# Commented out the buffer sizes and keeping the default.*
*# sort_buffer_size=2M by default.*
*# read_buffer_size=128K by default.*
*# 1Mb of read_rnd_buffer_size for 1GB RAM -- see notes below.*
*# read_rnd_buffer_size=256K by default.*
*# myisam_sort_buffer_size used for ALTER, OPTIMIZE, REPAIR TABLE commands.*
*# myisam_sort_buffer_size=8M by default.*
*# thread_concurrency = 2 * (no. of CPU)* thread_concurrency=2
*# log slow queries is a must. Many queries that take more than 2 seconds.*
*# If so, then your tables need enhancement.* log_slow_queries=/var/log/mysqld.slow.log long_query_time=2
*[mysql.server]* user=sabhijit basedir=/home/sabhijit/mysql/mysql-5.6.3-m6-linux2.6-x86_64
*[safe_mysqld]* err-log=/home/sabhijit/mysql/mysql-5.6.3-m6-linux2.6-x86_64/data/cr-beaodi-01.teleservices.com.err pid-file=/home/sabhijit/mysql/mysql-5.6.3-m6-linux2.6-x86_64/data/cr-beaodi-01.teleservices.com.pid open_files_limit=8192
*[mysqldump]* quick max_allowed_packet=16M
*# Remove the next comment character if you are not familiar with SQL*
*[isamchk]* key_buffer=64M sort_buffer=64M read_buffer=16M write_buffer=16M
*[myisamchk]* key_buffer=64M sort_buffer=64M read_buffer=16M write_buffer=16M
Can anyone help me !
Thanks Lenz for reply !
Actually when I am trying to start it ,I got the error which I posted before .
Earlier my socket file was in etc directory .
But now I surprised that it is not there now . How can I place it again .
Any solution ?
I know nothing about MySQL, but socket files are usually created at application start-up and located in the /tmp directory.
For what its worth, the following seems to match your problem:
The solution there was to disable SELinux.