$ bosh -e <ENV NAME> -d $service-instance_$(cf service <SERVICE NAME> --guid) ssh mysql/0
2. Add skip-log-bin to the the /var/vcap/jobs/mysql/config/my.cnf file and restart MySQL:
$ sudo -i $ echo "skip-log-bin" >> /var/vcap/jobs/mysql/config/my.cnf $ monit restart all
$ SET sql_log_bin = 0; ... <SQL DUMP CONTENTS>2. Securely copy the SQL dump onto the VM:
$ bosh -e <ENV NAME> -d $service-instance_$(cf service <SERVICE NAME> --guid) scp <THE SQL DUMP FILE> mysql/0:/tmp/sql-dump.sql3. (Optional) If you want to import the file into the service instance you turned off binary logging for:
$ bosh -e <ENV NAME> -d $service-instance_$(cf service <SERVICE NAME> --guid) ssh mysql/0 $ bosh -e <ENV NAME> -d $service-instance_$(cf service <SERVICE NAME> --guid) ssh mysql/0
$ bosh -e <ENV NAME> -d $service-instance_$(cf service <SERVICE NAME> --guid) ssh mysql/02. Find the binding user:
$ mysql --defaults-file=/var/vcap/jobs/mysql/config/mylogin.cnf $ mysql> SHOW FULL PROCESSLIST;From the output, you can identify the binding user by its generated UUID. For example: 8d8c4b58fc8a4ceaaee7d440459e943a. The user will also have a database associated with. For example: service_instance_db.
$ mysql GRANT SUPER ON *.* TO 8d8c4b58fc8a4ceaaee7d440459e943a@'%'; $ mysql FLUSH PRIVILEGES;
$ mysql SET sql_log_bin = 0;