I have been running SME server for a number of years with MySQL 5.5 upgraded with the instructions I found here:
https://forums.contribs.org/index.php/topic,50081.0.htmlThe instructions at the original post were to accomodate Moodle 2.5 back in 2013. I have abbreviated them along with the altered repository and some additional instructions for the specific purpose of installing MySQL 5.5.
You should copy and paste the commands into the command line to speed things up.
1. We first enable the InnoDB property of mysqld service.
/sbin/e-smith/db configuration setprop mysqld InnoDB enabled
2. Expand configuration to register
/sbin/e-smith/expand-template /etc/my.cnf
3. Then we fetch the latest MySQL 5.5 from the atomic repository as so:
/sbin/e-smith/db yum_repositories set atomic repository Name 'Atomic EL6' MirrorList 'http://www.atomicorp.com/mirrorlist/atomic/centos-6-$basearch' GPGCheck yes GPGKey 'https://www.atomicorp.com/RPM-GPG-KEY.art.txt' Visible no
4. Signal event now to register the yum command in accepting the added repository above:
/sbin/e-smith/signal-event yum-modify
5. Finally we yum install the MySQL with the command:
/usr/bin/yum -y --enablerepo='atomic' install mysql
At this point, MySQL still fails to start up properly. For we are going to be adding a template that is related to InnoDB.
6. We first make the directory of the file we want to expand: (read SME Developer Manual to understand the logic behind why we do this)
/bin/mkdir -p /etc/e-smith/templates-custom/etc/my.cnf/
7. We need to write a template. The template that we want to expand to form my.cnf: call it 009innodb and have the following contents:
{
my $innodb = $mysqld{InnoDB} || 'disabled';
return "skip-innodb" unless $innodb eq 'enabled';
# innodb is enabled. We'll use the MySQL-AB-recommended innodb
# defaults for small to medium sites, from the my-medium.cnf file
# distributed with MySQL
$OUT .= "innodb_data_home_dir = /var/lib/mysql/\n";
$OUT .= "innodb_data_file_path = ibdata1:10M:autoextend\n";
$OUT .= "innodb_log_group_home_dir = /var/lib/mysql/\n";
$OUT .= "innodb_buffer_pool_size = 16M\n";
$OUT .= "innodb_additional_mem_pool_size = 2M\n";
$OUT .= "innodb_log_file_size = 5M\n";
$OUT .= "innodb_log_buffer_size = 8M\n";
$OUT .= "innodb_flush_log_at_trx_commit = 1\n";
$OUT .= "innodb_lock_wait_timeout = 50\n";
}
Open a new text file copy the above into it and save it as 009innodb.
8. We then copy this file, 009innodb, to the template directory to be expanded:
cp /path/to/009innodb /etc/e-smith/templates-custom/etc/my.cnf/009innodb
(substitute "/path/to/" with the actual path to the file.)
9. Naturally, we finally expand this template to form my.cnf file:
/sbin/e-smith/expand-template /etc/my.cnf
10. All of the changes need to be registered in as post-upgrade and mysqld service would need to be restarted for the changes to take effect. Maybe a reboot command would be nice as well.
/sbin/e-smith/signal-event post-upgrade
/usr/bin/sv t mysqld
reboot computer
11. Go into mysql from the command line and type \s to see if you have installed the correct version.
At this point, you may be getting errors from your backups
Backup terminated: pre-backup failed - status: 256
In the logs,
Dec 21 10:00:02 xxxxx esmith::event[6488]: S20mysql-dump-tables=action|Event|pre-backup|Action|S20mysql-dump-tables|Start|1387648802 266242|End|1387648802 852948|Elapsed|0.586706|Status|256
To solve this,
12. Open the file
/etc/e-smith/events/actions/mysql-dump-tables
find the line with
for db in $(mysql -BNre "show databases;"); do mysqldump -x --add-drop-table -QB "$db" -r /home/e-smith/db/mysql/"$db".dump || exit 1; done
and add the -x as shown above.