How to change directory of binlogs on Ubuntu 18.04 Current config:
[mysqld]
datadir=/data/mysql
log-bin=test

Updated config:
[mysqld]
datadir=/data/mysql
log-bin=/binlogdata/test
log-bin-index=/binlogdata/test.index

What I did was:

Stop mysql service
Update my.cnf
Move the current binlogs to destination path using:

mv /data/dir/test.* /binlogdata/


Update /etc/apparmor.d/usr.sbin.mysqld I added /binlogdata/** rw
Reload apparmor
I excecuted chown on binlogdata

chown -R mysql:mysql /binlogdata


Start mysql service

Error on /var/log/mysql/error.log is
mysqld got signal 11 ;
I already got it to work after I added the 3rd line.