0

I've installed mysql on Centos 7 (mysql-community-server) as root. The problem is that I can't start the daemon with "service mysqld start", It never return me to prompt and even if I try to use another ssh session the daemon is not up.

This is the output I get with tail "/var/log/mysqld.log":

2015-02-19 02:43:45 15299 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2015-02-19 02:43:45 15299 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-02-19 02:43:45 15299 [Note] InnoDB: The InnoDB memory heap is disabled
2015-02-19 02:43:45 15299 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-02-19 02:43:45 15299 [Note] InnoDB: Memory barrier is not used
2015-02-19 02:43:45 15299 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-02-19 02:43:45 15299 [Note] InnoDB: Using Linux native AIO
2015-02-19 02:43:45 15299 [Note] InnoDB: Using CPU crc32 instructions
2015-02-19 02:43:45 15299 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-02-19 02:43:45 15299 [Note] InnoDB: Completed initialization of buffer pool
2015-02-19 02:43:45 15299 [Note] InnoDB: Highest supported file format is Barracuda.
2015-02-19 02:43:45 15299 [Note] InnoDB: Log scan progressed past the checkpoint lsn 49463
2015-02-19 02:43:45 15299 [Note] InnoDB: Database was not shutdown normally!
2015-02-19 02:43:45 15299 [Note] InnoDB: Starting crash recovery.
2015-02-19 02:43:45 15299 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-02-19 02:43:45 15299 [Note] InnoDB: Restoring possible half-written data pages
2015-02-19 02:43:45 15299 [Note] InnoDB: from the doublewrite buffer...
InnoDB: Doing recovery: scanned up to log sequence number 1600607
2015-02-19 02:43:45 15299 [Note] InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
2015-02-19 02:43:45 15299 [Note] InnoDB: 128 rollback segment(s) are active.
2015-02-19 02:43:45 15299 [Note] InnoDB: Waiting for purge to start
2015-02-19 02:43:45 15299 [Note] InnoDB: 5.6.23 started; log sequence number 1600607
2015-02-19 02:43:45 15299 [Note] Server hostname (bind-address): '*'; port: 3306
2015-02-19 02:43:45 15299 [Note] IPv6 is available.
2015-02-19 02:43:45 15299 [Note]   - '::' resolves to '::';
2015-02-19 02:43:45 15299 [Note] Server socket created on IP: '::'.
2015-02-19 02:43:45 15299 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
150219 02:43:45 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

I've tried to disable SELinux but it doesn't work neither. I don't know what is going on...

I'll really apreciate your help. Thankss

UPDATE: Output of /var/log/messages

Feb 19 01:52:15 localhost systemd: Started Network Manager Script Dispatcher Service.
Feb 19 01:53:51 localhost systemd: mysqld.service operation timed out. Stopping.
Feb 19 01:53:51 localhost systemd: Failed to start MySQL Community Server.
Feb 19 01:53:51 localhost systemd: Unit mysqld.service entered failed state.
Feb 19 01:53:51 localhost systemd: mysqld.service holdoff time over, scheduling restart.
Feb 19 01:53:51 localhost systemd: Stopping MySQL Community Server...
Feb 19 01:53:51 localhost systemd: Starting MySQL Community Server...
Feb 19 01:53:51 localhost mysqld_safe: 150219 01:53:51 mysqld_safe Logging to '/var/log/mysqld.log'.
Feb 19 01:53:51 localhost mysqld_safe: 150219 01:53:51 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Feb 19 01:53:52 localhost mysqld_safe: 150219 01:53:52 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
Feb 19 01:55:57 localhost systemd: Created slice user-0.slice.
Feb 19 01:55:57 localhost systemd: Starting Session 23 of user root.
Feb 19 01:55:57 localhost systemd: Started Session 23 of user root.
Feb 19 01:55:57 localhost systemd-logind: New session 23 of user root.
Feb 19 01:55:57 localhost systemd: Starting Session 24 of user root.
Feb 19 01:55:57 localhost systemd: Started Session 24 of user root.
Feb 19 01:55:57 localhost systemd-logind: New session 24 of user root.
Blof
  • 11
  • 4

1 Answers1

1

finally I found the solution:

I used:

mysql_install_db --user=mysql -ldata=/var/lib/mysql

and then

/usr/bin/mysql_secure_installation (it never worked before)

And It did the work!

Blof
  • 11
  • 4