N
N
neonox2014-02-18 21:06:44
MySQL
neonox, 2014-02-18 21:06:44

Why won't MySQL start?

Good day to all!
There is a VM with CentOS 6.5. And there is a problem with MySQL.
1. When restarting the VM, MYSQL does not start, it helps

service mysqld stop
mv /var/lib/mysqld/mysqld.sock /var/lib/mysqld/mysqld.sock.bak
service mysqld start

I'm trying to figure out why MySQL won't start. And here I run into a second problem. No logging occurs. Mysqld.log is empty. I created a new file, gave write permissions and pointed to it in the config, but still the logs do not go.
config

#
# Basic mysql configuration. Use bvat for advanced settings.
# Parameters set by bvat are stored in /etc/mysql/conf.d/bvat.cnf.
# If you want to change any parameter, you'll have to redefine it in /etc/mysql/conf.d/z_bx_custom.cnf
#
[client]
port = 3306
socket = /var/lib/mysqld/mysqld.sock
default-character-set = utf8
[mysqld_safe]
nice = 0
socket = /var/lib/mysqld/mysqld.sock
[mysqld]
# Basic mysql server configuration
user = mysql
port = 3306
basedir = /usr
datadir = /var/lib/mysql
socket = /var/lib/mysqld/mysqld.sock
skip-external-locking
bind-address = 127.0.0.1
default-storage-engine = innodb
pid-file = /var/run/mysqld/mysqld.pid
transaction-isolation = READ-COMMITTED
max_allowed_packet = 16M
myisam-recover = BACKUP
expire_logs_days = 10
max_binlog_size = 100M
log =/var/log/mysql.log
# Cache parameters
query_cache_size = 32M
table_open_cache = 4096
thread_cache_size = 32
key_buffer = 16M
thread_stack = 128K
join_buffer_size = 2M
sort_buffer_size = 2M
# Parameters for temporary tables
tmpdir = /tmp
max_heap_table_size = 32M
tmp_table_size = 32M
# InnoDB parameters
innodb_file_per_table
innodb_buffer_pool_size = 32M
innodb_flush_log_at_trx_commit = 2
innodb_log_file_size = 64M
innodb_flush_method = O_DIRECT
# Database charset parameters
character-set-server = utf8
collation-server = utf8_unicode_ci
init-connect = "SET NAMES utf8 COLLATE utf8_unicode_ci"
skip-character-set-client-handshake
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
default-character-set = utf8
[mysql]
[isamchk]
key_buffer = 16M
# Include additional settings
!includedir /etc/mysql/conf.d/

The main goal is to figure out why it is not being logged. And if you tell me about 1 problem, it will be generally cool.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Elena Bolshakova, 2014-05-11
@liruoko

Haven't found the cause of the problem yet?
Maybe there are not enough rights to intermediate directories to get to the file; maybe the config does not specify the same file, which you then look at. There might be something else.
When such "it is not clear what" happens with files and processes, strace is very useful, which displays all the system calls made with parameters and results ( man strace )
To trace all child processes - the -f switch
. do something like
(adjusted for config and binary)
and study strace_log.
First of all, it is interesting:
* is open done on a log file,
* what is the result of open,
* are writes made with the descriptor number that open returned.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question