MariaDB installd but wan't start

Issues related to applications and software problems
Post Reply
alix
Posts: 13
Joined: 2016/01/25 21:13:17

MariaDB installd but wan't start

Post by alix » 2016/04/06 09:51:54

Hi,

I installd mariadb but its failing to start mysql service,

systemctl status mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Wed 2016-04-06 11:45:10 CEST; 1min 57s ago
Process: 5190 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER (code=exited, status=1/FAILURE)
Main PID: 5190 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
how can i find the details of this problem?

User avatar
TrevorH
Site Admin
Posts: 33220
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: MariaDB installd but wan't start

Post by TrevorH » 2016/04/06 09:55:18

Look in the log - most likely /var/log/mysqld.log though I don't use mariadb yet so it may be called something else.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

alix
Posts: 13
Joined: 2016/01/25 21:13:17

Re: MariaDB installd but wan't start

Post by alix » 2016/04/06 14:04:19

there is no log for mariadb, in this folder /var/log/mysqld.log

My problem is installing mariadb, i install with yum install MariaDB-server and i also past the settings in /etc/yum.repo/MariaDB.repo.

but after the installation i try to start the script

Code: Select all

sudo mysql_secure_installation
this is where it go's wrong. It asks the root password so i press enter because i have no password set yet for mariadb and stil it wan't let me in and mariadb is failing to start.

Where dose go's wrong? how can i solve this issue?

giulix63
Posts: 1305
Joined: 2014/05/14 10:06:37
Location: UK

Re: MariaDB installd but wan't start

Post by giulix63 » 2016/04/06 14:10:11

mariadb is in the base CentOS repository (meaning it's part of CentOS distribution). Just do a

Code: Select all

yum install mariadb-server
as root to install version 5.5.47. If you have specific requirements that force you to install from a third-party repository, then you'll probably have to turn to them for support.
Root is evil: Do not use root (sudo) to run any of the commands specified in my posts unless explicitly indicated. Please, provide the necessary amount of context to understand your problem/question.

alix
Posts: 13
Joined: 2016/01/25 21:13:17

Re: MariaDB installd but wan't start

Post by alix » 2016/04/06 16:30:29

i did that again adn then i tryd mysql_secure_installation and get this error when i try to login with no password by pressing just enter button:
mysql_secure_installation
/bin/mysql_secure_installation: line 379: find_mysql_client: command not found

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Enter current password for root (enter for none):

giulix63
Posts: 1305
Joined: 2014/05/14 10:06:37
Location: UK

Re: MariaDB installd but wan't start

Post by giulix63 » 2016/04/06 17:43:03

Just ignore the first error (/bin/mysql_secure_installation: line 379: find_mysql_client: command not found. Note to self: is there a BZ for this? Yes, fixed upstream since 10.0.5). Before running the mysql_secure_installation script make sure the database is up&running:

Code: Select all

systemctl -l start mariadb
Run as root.
Last edited by giulix63 on 2016/04/07 00:39:11, edited 1 time in total.
Root is evil: Do not use root (sudo) to run any of the commands specified in my posts unless explicitly indicated. Please, provide the necessary amount of context to understand your problem/question.

alix
Posts: 13
Joined: 2016/01/25 21:13:17

Re: MariaDB installd but wan't start

Post by alix » 2016/04/06 18:59:02

hi giulix63,

i have try'd your command, it stil wan't start. I managed to get the logs of starting mariadb:
160406 20:52:31 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
160406 20:52:31 [Note] /usr/libexec/mysqld (mysqld 5.5.47-MariaDB) starting as process 5231 ...
160406 20:52:31 InnoDB: The InnoDB memory heap is disabled
160406 20:52:31 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160406 20:52:31 InnoDB: Compressed tables use zlib 1.2.7
160406 20:52:31 InnoDB: Using Linux native AIO
160406 20:52:31 InnoDB: Initializing buffer pool, size = 128.0M
160406 20:52:31 InnoDB: Completed initialization of buffer pool
InnoDB: Error: checksum mismatch in data file ./ibdata1
160406 20:52:31 InnoDB: Could not open or create data files.
160406 20:52:31 InnoDB: If you tried to add new data files, and it failed here,
160406 20:52:31 InnoDB: you should now edit innodb_data_file_path in my.cnf back
160406 20:52:31 InnoDB: to what it was, and remove the new ibdata files InnoDB created
160406 20:52:31 InnoDB: in this failed attempt. InnoDB only wrote those files full of
160406 20:52:31 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
160406 20:52:31 InnoDB: remove old data files which contain your precious data!
160406 20:52:31 [ERROR] Plugin 'InnoDB' init function returned error.
160406 20:52:31 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160406 20:52:31 [Note] Plugin 'FEEDBACK' is disabled.
160406 20:52:31 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
160406 20:52:31 [ERROR] Unknown/unsupported storage engine: InnoDB
160406 20:52:31 [ERROR] Aborting

160406 20:52:32 [Note] /usr/libexec/mysqld: Shutdown complete

160406 20:52:32 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: MariaDB installd but wan't start

Post by gerald_clark » 2016/04/06 19:05:44

You are trying to start MariaDB with data files left over from a foreign version.
Delete the MariaDB data files and restart the server.

alix
Posts: 13
Joined: 2016/01/25 21:13:17

Re: MariaDB installd but wan't start

Post by alix » 2016/04/07 09:46:02

thanks clark, that did the job to work. I have removed the data files and afterwards i run fresh install of mariadb.

Thanks,

alix

Post Reply