I am following the guide at this site and trying to exclude databases with the name turnkey in them.
find /var/lib/mysql -mindepth 1 -maxdepth 1 -type d | cut -d'/' -f5 | grep -v ^mysql\$ | tr \\\r\\\n ,\ `
this command returns all the database names, how can I remove the turnkey ones?
The command you show is a Linux / unix shell command. If you add another step
you will omit any lines with the word “turnkey” in them.
Like so:
You didn’t ask if this is a good idea. I don’t think it is, because it relies on a particular ondisk structure for the MySQL server daemon software that is not part of the formal specification of the system. In other words, it could change.
You could do this: