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