MCPcopy Index your code
hub / github.com/sqlc-dev/sqlc / mysqlReady

Function mysqlReady

cmd/sqlc-test-setup/main.go:664–667  ·  view source on GitHub ↗

mysqlReady checks if MySQL is running and accepting connections with the expected password.

()

Source from the content-addressed store, hash-verified

662
663// mysqlReady checks if MySQL is running and accepting connections with the expected password.
664func mysqlReady() bool {
665 err := exec.Command("mysqladmin", "-h", "127.0.0.1", "-u", "root", "-pmysecretpassword", "ping").Run()
666 return err == nil
667}
668
669// waitForMySQL polls until MySQL accepts connections or the timeout expires.
670func waitForMySQL(timeout time.Duration) error {

Callers 1

startMySQLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected