wait-for-mysql
accepts a MySQL (go-mysql-driver
) connection string and attempts to connect to the provided database until successful or until a timeout period is reached.
$ wait-for-mysql -timeout 60s -interval 2s 'root:passwd@tcp(localhost:3306)/my_db'