-2

The system had MariaDB before which I couldn't start either. Now I deleted MariaDB and installed MySQL.

$ mysql --version
mysql  Ver 14.14 Distrib 5.6.23, for Linux (x86_64) using  EditLine wrapper

now I try to start daemon mysql with sudo /sbin/service mysqld start and at last see

Job for mysqld.service failed. See 'systemctl status mysql.service' and journalctl -xn' for details

$ systemctl status mysqld.service
mysqld.service - MySQL Community Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled)
   Active: activating (start-post) since Пн 2015-02-23 10:49:14 MSK; 16s ago
  Process: 11775 ExecStart=/usr/bin/mysqld_safe (code=exited, status=0/SUCCESS)
  Process: 11764 ExecStartPre=/usr/bin/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 11775 (code=exited, status=0/SUCCESS);         : 11776 (mysql-systemd-s)
   CGroup: /system.slice/mysqld.service
           └─control
             ├─11776 /bin/bash /usr/bin/mysql-systemd-start post
             └─12009 sleep 1

then try

$ journalctl -xn

displays "No journal files were found".

file /etc/my.cnf

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

Also I saw no form (like on ubuntu) to setup root or password during installation. Have no idea what to do.

closed as off-topic by mdpc, MadHatter, HopelessN00b Feb 24 '15 at 10:57

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • If your journal is broken, you have more serious problems than just MySQL not starting. Fix those, or just reinstall CentOS. - Also, CentOS does not do lots of nonstandard things like Debian/Ubuntu do, so you would need to use the standard mysql_secure_installation command to set your MySQL root password (after your issues are fixed). – Michael Hampton Feb 23 '15 at 13:06
  • I reinstalled MySQL and it works now. May be the problem was in wrong customization during the installation. Thanks to everyone for non-ignoring my problem. – barbarian Feb 24 '15 at 16:23
1

Before you use mysql, you have to run through and initialize things using the command:

 /usr/bin/mysql_install_db
  • done that. when tried to start mysql it writes Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock. (2) I can't find that file in that directory. – barbarian Feb 23 '15 at 10:26
  • he was created then the service start correctly. Can you put your my.cnf configuration please. – Jérémy Munoz Feb 23 '15 at 10:34
  • put this in question – barbarian Feb 23 '15 at 11:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.