upgrade 3.0.1.9 Mysql Can't create/write to file '/var/log/mysqld.log'

Report bugs and workarounds
Post Reply
henk
Posts: 518
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

upgrade 3.0.1.9 Mysql Can't create/write to file '/var/log/mysqld.log'

Post by henk »

Just finished the upgrade with 2 minor issues related to the database change to mariadb.

1. In case you did some mysql tuning on the innodb_log_file_size :naughty:

Revert the modification: ( make a snapshot!!)

Stop the DB: service mysqld stop

[root@l]#ls -l /var/lib/mysql

drwx------. 2 mysql mysql 4096 Jul 31 2016 efa
-rw-rw----. 1 mysql mysql 44040192 Mar 26 12:29 ibdata1
-rw-rw---- 1 mysql mysql 33554432 Mar 26 12:29 ib_logfile0
-rw-rw---- 1 mysql mysql 33554432 Mar 26 12:28 ib_logfile1

Remove logfiles: rm /var/lib/mysql/ib_logfile0

remove the innodb_log_file_size entry from /etc/my.cnf

#innodb_log_file_size = 32M

Restart db : service mysqld start

This will create the default logfiles again.

2. During the upgrade you get err message : Can't create/write to file '/var/log/mysqld.log' (Errcode: 13)

see: https://jira.mariadb.org/browse/MDEV-11841

do not stop mysql :roll:
chmod 666 /var/log/mysqld.log

run the upgrade again : /usr/local/sbin/EFA-Update -update

this will finish the upgrade to 3.0.1.9 update is complete

All done
Please restart your system as soon as possible.
If your system does not return to a command prompt
you can now safely press ctrl-c to abort logsave
Thank you for using E.F.A.
=============================================================================

Since we use Mariadb now, we can add a great option : innodb-defragment

https://mariadb.com/kb/en/mariadb/defra ... blespaces/

run : mysqlcheck --all-databases -o

Now add the option to: /etc/my.cnf.d/server.cnf

# This group is only read by MariaDB-10.1 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.1]
innodb-defragment = 1 <==== add this line

Restart DB: service mysql restart

now run mysqlcheck again and see the difference :clap:

mysqlcheck --all-databases -o
“We are stuck with technology when what we really want is just stuff that works.” -Douglas Adams
User avatar
shawniverson
Posts: 3783
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: upgrade 3.0.1.9 Mysql Can't create/write to file '/var/log/mysqld.log'

Post by shawniverson »

:clap:
henk
Posts: 518
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

Re: upgrade 3.0.1.9 Mysql Can't create/write to file '/var/log/mysqld.log'

Post by henk »

I also added: innodb_file_per_table = 1 in /etc/my.cnf.d/server.cnf

[mariadb-10.1]
innodb-defragment = 1
innodb_file_per_table = 1

I also noticed that there is no exclude anymore in:/etc/yum.conf

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
exclude=
#exclude=open-vm-tools* perl-Net-DNS MailScanner*

So after the upgrade:

yum install MariaDB-common.x86_64 MariaDB-compat.x86_64

Thanks for the massive effort to keep our mail sane :dance:
“We are stuck with technology when what we really want is just stuff that works.” -Douglas Adams
Post Reply