mysql start failed

this is the output:

Mar 25 17:56:04 linux-4v2w mysql[20756]: Log files inconsistency, please merge following files manually:Mar 25 17:56:04 linux-4v2w mysql[20756]: Running protected MySQL...
Mar 25 17:56:34 linux-4v2w mysql[20756]: error: /var/tmp/mysql-protected.z8CZty/mysql.sock file didn't appeared...
Mar 25 17:56:34 linux-4v2w mysql[20756]: Try checking "/var/log/mysql/mysqld-upgrade-run.log"...
Mar 25 17:56:34 linux-4v2w mysql[20756]: ..failed
Mar 25 17:56:34 linux-4v2w systemd[1]: mysql.service: control process exited, code=exited status=1
Mar 25 17:56:34 linux-4v2w systemd[1]: Failed to start LSB: Start the MySQL database server.
Mar 25 17:56:34 linux-4v2w systemd[1]: Unit mysql.service entered failed state.



and this is from mysqld-upgrade-tun.log

140325 17:56:04 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysqla/usr/sbin/mysqld: Can't read dir of '/etc/mysql' (Errcode: 2 - No such file or directory)
Fatal error in defaults handling. Program aborted
140325 17:56:04 mysqld_safe mysqld from pid file /var/tmp/mysql-protected.z8CZty/mysqld.pid ended

What openSUSE version?
How did you install mysql and how are you running it?
Is this mysql or mariadb? And which version?
If you use the openSUSE packages, please post the output of:

rpm -qa | egrep "(maria|mysql)"

Normally /etc/mysql/ should not be needed, I don’t have it here with mariadb (I have /etc/my.cnf.d/ though).
Maybe it is referenced by /etc/my.conf? Maybe post that file.

opensuse 13.1

and this is the output:

libqt4-sql-mysql-4.8.5-5.9.2.x86_64libmysqld18-5.5.33-2.2.x86_64
mysql-community-server-errormessages-5.6.12-7.2.2.x86_64
libqt4-sql-mysql-32bit-4.8.5-5.9.2.x86_64
SOPE-gdl1-mysql-2.2.2-4.1.x86_64
libmysqlclient-devel-5.5.33-2.2.x86_64
libmysqlclient18-5.5.33-2.2.x86_64
libmysqlclient_r18-5.5.33-2.2.x86_64
libreoffice-base-drivers-mysql-4.2.2.1-131.2.x86_64
mysql-community-server-5.6.12-7.2.2.x86_64
mysql-community-server-client-5.6.12-7.2.2.x86_64
mariadb-errormessages-5.5.33-2.2.x86_64
libmysqlclient18-32bit-5.5.33-2.2.x86_64
libmysqlcppconn6-1.1.2-34.1.x86_64
php5-mysql-5.5.9-212.5.x86_64

my.cnf

# This is default example of MySQL/MariaDB configuration provided with openSUSE package# It is based on upstream defaults with some additional examples.




# The following options will be passed to all MariaDB clients
[client]
# password  = your_password
# port       = 3306
# socket     = /var/run/mysql/mysql.sock


[mysqld]


# Remove leading # if you don't want to listen on network (only socket - safer)
# skip-networking


# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M


# Using newer file format that supports dynamic and compressed row formats.
# If you are using replication you have to make sure, that these options are
# set everywhere the same way (probably comment them out is the easiest way)
innodb_file_format=Barracuda
innodb_file_per_table=ON


# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin=mysql-bin
# binlog_format=mixed


# Remove leading # if you want to store your database elsewhere
# datadir	= /var/lib/mysql


# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id	= 1


# These are commonly set, remove the # and set as required.
# port = 3306
# socket = /var/run/mysql/mysql.sock


# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
# 
# skip-networking


# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M 


sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES


[mysqld_multi]
mysqld     = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
log        = /var/log/mysqld_multi.log


# If you want to use mysqld_multi uncomment 1 or more mysqld sections
# below or add your own ones.


# WARNING
# --------
# If you uncomment mysqld1 than make absolutely sure, that database mysql,
# configured above, is not started.  This may result in corrupted data!
#
# [mysqld1]
# port       = 3306
# datadir    = /var/lib/mysql
# pid-file   = /var/lib/mysql/mysqld.pid
# socket     = /var/lib/mysql/mysql.sock
# user       = mysql


# [mysqld2]
# port       = 3307
# datadir    = /var/lib/mysql-databases/mysqld2
# pid-file   = /var/lib/mysql-databases/mysqld2/mysql.pid
# socket     = /var/lib/mysql-databases/mysqld2/mysql.sock
# user       = mysql


# [mysqld3]
# port       = 3308
# datadir    = /var/lib/mysql-databases/mysqld3
# pid-file   = /var/lib/mysql-databases/mysqld3/mysql.pid
# socket     = /var/lib/mysql-databases/mysqld3/mysql.sock
# user       = mysql


# [mysqld6]
# port       = 3309
# datadir    = /var/lib/mysql-databases/mysqld6
# pid-file   = /var/lib/mysql-databases/mysqld6/mysql.pid
# socket     = /var/lib/mysql-databases/mysqld6/mysql.sock
# user       = mysql


!includedir /etc/my.cnf.d



And the answers to all the other questions?

OK, so this is about mysql, not mariadb.

Looks fine, no mentioning of /etc/mysql. What files do you have in /etc/my.cnf.d/ though? Please post their content as well.

And again: how are you trying to start mysql?

Do you have old databases (i.e. is this an upgrade), or are you starting fresh?

If it’s an upgrade, you might want to try removing the file /var/lib/mysql/.run-mysql_upgrade:

sudo rm /var/lib/mysql/.run-mysql_upgrade

what questions?
i have opensuse 13.1 and i install mysql from the opensuse repo and you can look on the output i post. i will be very thankfull if you will help me

This ones:

i have an old database thats backup in another server soo if i need to clean the database than no problem amigo

and i try to run like this:

systemctl start mysql.service

So it is an upgrade.

Well, the upgrade from 12.3’s mysql 5.5 to 13.1’s mysql 5.6 didn’t work here either, but this fixed it for me:

sudo rm /var/lib/mysql/.run-mysql_upgrade

That doesn’t wipe out your databases, it only skips the upgrade process, which doesn’t work anyway apparently.

But that error message about /etc/mysql/ still disturbs me.
So is anything in /etc/my.cnf.d/ referring to this?

You could also try to switch the MariaDB instead, that should just work with those mysql 5.5 databases. I did (mainly because mysql 5.6 used way to much RAM with the default config, >512MiB on my 2GiB machine), and don’t regret it.

well there is :

default_plugins.cnf

and this is the content:

[server]
plugin-load=blackhole=ha_blackhole.so
plugin-load=federated=ha_federated.so
plugin-load=archive=ha_archive.so

i try this command : sudo rm /var/lib/mysql/.run-mysql_upgrade
this is the output:

linux-4v2w:~ # sudo rm /var/lib/mysql/.run-mysql_upgrade
linux-4v2w:~ # systemctl start mysql.service 
Job for mysql.service failed. See 'systemctl status mysql.service' and 'journalctl -xn' for details.
linux-4v2w:~ # systemctl status mysql.service
mysql.service - LSB: Start the MySQL database server
   Loaded: loaded (/etc/init.d/mysql)
   Active: failed (Result: exit-code) since Tue 2014-03-25 19:45:51 IST; 45s ago
  Process: 8470 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)


Mar 25 19:45:21 linux-4v2w mysql[8470]: [100B blob data]
Mar 25 19:45:21 linux-4v2w mysql[8470]: Fatal error in defaults handling. Program aborted
Mar 25 19:45:21 linux-4v2w mysql[8470]: [80B blob data]
Mar 25 19:45:21 linux-4v2w mysql[8470]: Fatal error in defaults handling. Program aborted
Mar 25 19:45:51 linux-4v2w mysql[8470]: Starting service MySQL warning: /var/run/mysql/mysql.sock didn't appear within 30 seconds
Mar 25 19:45:51 linux-4v2w mysql[8470]: chmod: cannot access '/var/run/mysql/mysqld.pid': No such file or directory
Mar 25 19:45:51 linux-4v2w mysql[8470]: ..failed
Mar 25 19:45:51 linux-4v2w systemd[1]: mysql.service: control process exited, code=exited status=1
Mar 25 19:45:51 linux-4v2w systemd[1]: Failed to start LSB: Start the MySQL database server.
Mar 25 19:45:51 linux-4v2w systemd[1]: Unit mysql.service entered failed state.

Ok, same as here.

So maybe that /etc/mysql is just a red herring.

Try to remove that /var/lib/mysql/.run-mysql_upgrade file then, or switch to MariaDB (you just need to install the package “mariadb”, the rest should be done automatically), this is default since 12.3 anyway.

working. thanks everyone. its suddenly start.

just want to know what is 100B blob data] Fatal error in defaults handling. Program aborted and how i can handle it in the future?

just want to know what is “[100B blob data] Fatal error in defaults handling. Program aborted” and how i can handle it in the future?

BLOB means “Binary large object”, i.e. binary data:
http://en.wikipedia.org/wiki/Binary_large_object

What that message means, I don’t know though. Maybe there was some binary data somewhere where it wasn’t expected? Because of the failed upgrade process maybe?

thanks.

i just want to know if there is a way to remove completely mysql or mariadb from the system(that both will be out of the system)? because i see that some components depend on them.

Why do you want to remove it now, when you first tried to get it to run? :wink:

But yes, you can remove the server (i.e. “mariadb” and “mysql-community-server”). But akonadi depends on it (it uses mysql by default), so you would have to remove that (and the whole KDEPIM) as well.
And libmysqld is needed by amarok.

You HAVE to keep libmysqlclient though, but that has nothing to do with the server.