Page 1 of 2

MySql not getting started

Posted: 2016/05/11 17:39:02
by midhunv
I have a issue with mysql,It shows error in .etc/conf in line 1.what shall be the error ,pls help

Re: MySql not getting started

Posted: 2016/05/11 17:50:24
by gerald_clark
Show exact error message. We are not psychic.

Re: MySql not getting started

Posted: 2016/05/12 13:35:32
by midhunv
[root@localhost ~]# service mysqld start
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
MySQL Daemon failed to start.
Starting mysqld: [FAILED]

Re: MySql not getting started

Posted: 2016/05/12 13:35:59
by midhunv
This is what i get ,what should be the issue?

Re: MySql not getting started

Posted: 2016/05/12 13:42:55
by gerald_clark
Fix your config files as the messages indicate.

Re: MySql not getting started

Posted: 2016/05/12 13:53:41
by midhunv
If I had known how to fix it ,I wouldn't have posted anything in here ,Folks who can help ,pls guide me ,Tnx

Re: MySql not getting started

Posted: 2016/05/12 14:09:55
by TrevorH
No one can help if you don't post enough information. Since it's complaining about the syntax in your config file you will need to post your config file.

Re: MySql not getting started

Posted: 2016/05/12 14:21:30
by midhunv
[mysqld]
service mysqld start
cp /etc/my.cnf /etc/my.cnf.original
echo "" > /etc/my.cnf
[mysql.server]
user = mysql
#basedir = /var/lib

[client]
port = 3306
socket = /var/lib/mysql/mysql.sock

[mysqld]
datadir = /var/lib/mysql
#tmpdir = /home/mysql_tmp
socket = /var/lib/mysql/mysql.sock
user = mysql
old_passwords = 0
ft_min_word_len = 3
max_connections = 800
max_allowed_packet = 32M
skip-external-locking

log-error = /var/log/mysqld/mysqld.log

query-cache-type = 1
query-cache-size = 32M

long_query_time = 1
#slow_query_log = 1
#slow_query_log_file = /var/log/mysqld/slow-queries.log

tmp_table_size = 128M
table_cache = 1024

join_buffer_size = 1M
key_buffer = 512M
sort_buffer_size = 6M
read_buffer_size = 4M
read_rnd_buffer_size = 16M
myisam_sort_buffer_size = 64M

max_tmp_tables = 64

thread_cache_size = 8
thread_concurrency = 8

# If using replication, uncomment log-bin below
#log-bin = mysql-bin

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

[mysqld_safe]
#log-error = /var/log/mysqld/mysqld.log
#pid-file = /var/run/mysqld/mysqld.pid

Re: MySql not getting started

Posted: 2016/05/12 15:46:13
by gerald_clark
That first [mysqld] section is garbage.
I suggest reading the documentation at
http://dev.mysql.com/doc/ that covers the configf files.

Re: MySql not getting started

Posted: 2016/05/12 16:15:05
by midhunv
Sorry ,It was my Mistake ,Tried without mysqld at line 1 ,then the error shws as i pasted ,When i add mysqld at line 1 ,it simply demon failed .
what to do?