-3

I have a digital Ocean droplet on CentOS 7. I had installed 5.7 in the beginning, but I wanted to use 5.6 for some reason. So I just removed 5.7 using yum remove, and then after disabling 5.7 from yum. Then I enabled 5.6 and installed it. But since then it just won't start. Following is the dump from log file:

170615 20:39:49 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2017-06-15 20:39:49 0 [Warning] TIMESTAMP with implicit DEFAULT value is                       deprecated. Please use --explicit_defaults_for_timestamp server option (see     documentation for more details).
2017-06-15 20:39:49 0 [Note] /usr/sbin/mysqld (mysqld 5.6.36) starting as process 2536 ...
2017-06-15 20:39:49 2536 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)

2017-06-15 20:39:49 2536 [Warning] Buffered warning: Changed limits: table_open_cache: 431 (requested 2000)

2017-06-15 20:39:49 2536 [Note] Plugin 'FEDERATED' is disabled./usr/sbin/mysqld: Unknown storage engine 'InnoDB
2017-06-15 20:39:49 2536 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2017-06-15 20:39:49 2536 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-06-15 20:39:49 2536 [Note] InnoDB: The InnoDB memory heap is disabled 2017-06-15 20:39:49 2536 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-06-15 20:39:49 2536 [Note] InnoDB: Memory barrier is not used
2017-06-15 20:39:49 2536 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-06-15 20:39:49 2536 [Note] InnoDB: Using Linux native AIO
2017-06-15 20:39:49 2536 [Note] InnoDB: Using CPU crc32 instructions
2017-06-15 20:39:49 2536 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-06-15 20:39:49 2536 [Note] InnoDB: Completed initialization of buffer pool
2017-06-15 20:39:49 2536 [Note] InnoDB: Highest supported file format is Barracuda.
InnoDB: No valid checkpoint found.
InnoDB: If you are attempting downgrade from MySQL 5.7.9 or later,
InnoDB: please refer to http://dev.mysql.com/doc/refman/5.6/en/upgrading-downgrading.html
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/error-creating-innodb.html
2017-06-15 20:39:49 2536 [ERROR] Plugin 'InnoDB' init function returned error.
2017-06-15 20:39:49 2536 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-06-15 20:39:49 2536 [ERROR] Unknown/unsupported storage engine: InnoDB
2017-06-15 20:39:49 2536 [ERROR] Aborting

2017-06-15 20:39:49 2536 [Note] Binlog end
2017-06-15 20:39:49 2536 [Note] Shutting down plugin 'partition'
2017-06-15 20:39:49 2536 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2017-06-15 20:39:49 2536 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2017-06-15 20:39:49 2536 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'

And then it shuts down, I am not sure what additional needs to be done to be able to use this version.

peterh
  • 4,953
  • 13
  • 30
  • 44
  • 1
    Have you tried to actually *read* and understand the error messages? There is a hint in there that just might help you solve this ... – Sven Jun 15 '17 at 21:30
  • honestly yes not everything is clear to me I am a newbie to mysql stuff. – vishal dharankar Jun 15 '17 at 21:31
  • perhaps I understood few messages but dont know what to do about those for example Uknown storage engine error – vishal dharankar Jun 15 '17 at 21:32
  • Citing your text: If you are attempting downgrade from MySQL 5.7.9 or later, please refer to http://dev.mysql.com/doc/refman/5.6/en/upgrading-downgrading.html. Really, carefully reading error messages and following instructions in there is a fundamental requirement to ask a question anywhere on the internet. – Sven Jun 15 '17 at 21:32
  • See I dont know how these downgrade instructions apply here, since I have completely removed previous installation and then installed 5.6 as a fresh install , what I am expecting is it should start a fresh. I havent overwritten older installation. – vishal dharankar Jun 15 '17 at 21:34

1 Answers1

3

yum doesn't remove data files. If you really want to purge your old MySQL install, you need to also remove the actual database files manually.

yum erase mysql-server    ## or whatever the relevant package name is
rm -rf /var/lib/mysql   

or something along that line.

Careful! This will remove the complete database so that when you install a new version, it can be recreated from scratch (also, depending on the package you installed, this directory might be located somewhere else - this should be listed in /etc/my.cnf:

[mysqld]
datadir=/var/lib/mysql
...

When in doubt, make sure you have a backup ready!

Sven
  • 98,649
  • 14
  • 180
  • 226
  • thanks erase option of yum , i wasnt aware of, that worked , you see this is what I mean , i knew old install was messing up but couldn't understand why it should if I have removed it. Thanks again. – vishal dharankar Jun 15 '17 at 21:53