upgrade 3.0.1.9 Mysql Can't create/write to file '/var/log/mysqld.log'
Posted: 26 Mar 2017 11:42
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
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
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
mysqlcheck --all-databases -o
1. In case you did some mysql tuning on the innodb_log_file_size

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

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

mysqlcheck --all-databases -o