I previously installed MySQL built-in 5.1 and it worked well. Today, I followed this article and installed 5.7. Unfortunately, my VM has limited ram (512mb) and 5.7 cannot be started. I would like to downgrade MySQL to my working version 5.1.

I did remove 5.7 by using yum remove mysql successfully. But then:

# yum download mysql
No Match for available package: mysql-5.1.73-8.el6_8.i686
Nothing to do

If I run yum install mysql, it reinstall 5.7 version again. How can I reinstall mysql 5.1?

Log from file mysqld.log.rpmsave

170620 23:48:04  InnoDB: Starting shutdown...
170620 23:48:10  InnoDB: Shutdown completed; log sequence number 0 34058928
170620 23:48:10 [Note] 
170620 23:48:10 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
170620 23:54:27 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
170620 23:54:27 [ERROR] Can't read from messagefile '/usr/share/mysql/english/errmsg.sys'
170620 23:54:27  InnoDB: Initializing buffer pool, size = 8.0M
170620 23:54:27  InnoDB: Completed initialization of buffer pool
170620 23:54:27  InnoDB: Started; log sequence number 0 34058928
170620 23:54:27 [ERROR] /usr/libexec/mysqld: unknown variable 'innodb_large_prefix=true'
170620 23:54:27 [ERROR] Aborting

170620 23:54:27  InnoDB: Starting shutdown...
170620 23:54:32  InnoDB: Shutdown completed; log sequence number 0 34058928
170620 23:54:32 [Note] 
170620 23:54:32 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

Log from file messages

Jun 21 00:46:03 vpn1UgoVPNcom kernel: Out of memory: Kill process 31276 (mysqld) score 162 or sacrifice child
Jun 21 00:46:03 vpn1UgoVPNcom kernel: Killed process 31276, UID 0, (mysqld) total-vm:126948kB, anon-rss:98224kB, file-rss:8kB

There is no such file mysqld.err , also Mysqld.log is empty

Attempting to start MySQL 5.7

[root@vpn1UgoVPNcom home]# service mysqld start
/usr/bin/mysqld_safe: line 196:  9475 Killed                  nohup /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock < /dev/null > /dev/null 2>&1
MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]
  • limited ram? I am running MySQL 5.5 with 256MB RAM. It is not fast but it works. Have you looked at the error log /var/log/mysql.err?
    – hschou
    Jun 21 '17 at 6:44
  • I have uploaded some log. Please help to review.
    – Cliff
    Jun 21 '17 at 15:05
  • MySQL 5.1 was end-of-lifed in 2013. Instead of rolling back to a long-dead version of MySQL, you'd be better off trying to fix the memory usage problem or upgrading to the next logical release, like MySQL 5.5. May 29 '18 at 21:53

I ran the following commands and it's back to 5.1 and running well now:

yum remove 'mysql*'
yum install mysql-server-5.1*
service mysqld start

That article has you add the Oracle community MySQL repos, whose packages obsolete the stock packages. You need to disable that repository first (yum-config-manager --disable mysql57-community or edit the files in /etc/yum.repos.d) and then you can install the stock 5.1 version from the stock repos again.

  • I tried your command and the output is: # yum-config-manager --disablerepo mysql57-community Loaded plugins: fastestmirror Error getting repository data for mysql57-community, repository not found
    – Cliff
    Jun 22 '17 at 2:46
  • Whoops, small typo. Use the flag --disable, not --disablerepo. I edited my answer to correct that command. Jun 22 '17 at 2:50

You can download the RPM from the below link and install it using RPM install command:

rpm -ivh mysql-5.1.73-8.el6_8.x86_64.rpm

Download Link: https://centos.pkgs.org/6/centos-x86_64/mysql-5.1.73-8.el6_8.x86_64.rpm.html

  • rpm -ivh mysql-5.1.73-8.el6_8.i686.rpm error: Failed dependencies: mysql-libs = 5.1.73-8.el6_8 is needed by mysql-5.1.73-8.el6_8.i686
    – Cliff
    Jun 21 '17 at 15:11
  • Try this please rpm -Uvh --force mysql-5.1.73-8.el6_8.i686.rpm.
    – Amit24x7
    Jun 22 '17 at 5:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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