mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-19 08:46:38 +00:00
MySQL Connection Fix
This commit is contained in:
@@ -39,24 +39,17 @@ func CreateMyDB() (func(), error) {
|
||||
|
||||
ctx := context.Background()
|
||||
c, err := mysql.Run(ctx,
|
||||
"mysql:8.0.36",
|
||||
mysql.WithDatabase("foo"),
|
||||
mysql.WithUsername("root"),
|
||||
mysql.WithPassword(""),
|
||||
testcontainers.WithWaitStrategy(
|
||||
wait.ForLog("database system is ready to accept connections").
|
||||
WithOccurrence(1).WithStartupTimeout(30*time.Second)),
|
||||
"mysql:8.0.40",
|
||||
mysql.WithDatabase("netbird"),
|
||||
mysql.WithUsername("netbird"),
|
||||
mysql.WithPassword("mysql"),
|
||||
)
|
||||
|
||||
log.Printf("[DEBUG] CreateMyDB - 2")
|
||||
|
||||
if err != nil {
|
||||
log.Printf("[DEBUG] CreateMyDB Error: %s", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
log.Printf("[DEBUG] CreateMyDB - 3")
|
||||
|
||||
talksConn, err := c.ConnectionString(ctx)
|
||||
|
||||
log.Printf("[DEBUG] CreateMyDB - ConnectionString: %s, Error: %s", talksConn, err)
|
||||
|
||||
Reference in New Issue
Block a user