Skip to content

Commit 24f2060

Browse files
committed
Merge pull request mauricio#125 from mst-appear/master
Do not assume MySQL root user without password
2 parents 598a265 + 90e0073 commit 24f2060

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

mysql-async/src/test/scala/com/github/mauricio/async/db/mysql/MySQLConnectionSpec.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ class MySQLConnectionSpec extends Specification {
3030
database = Some("mysql_async_tests")
3131
)
3232

33-
val rootConfiguration = new Configuration(
34-
"root",
33+
val configurationWithoutPassword = new Configuration(
34+
"mysql_async_nopw",
3535
"localhost",
3636
port = 3306,
3737
password = None,
3838
database = Some("mysql_async_tests")
3939
)
4040

4141
val configurationWithoutDatabase = new Configuration(
42-
"root",
42+
"mysql_async_nopw",
4343
"localhost",
4444
port = 3306,
4545
password = None,
@@ -69,7 +69,7 @@ class MySQLConnectionSpec extends Specification {
6969
withNonConnectedConnection({
7070
connection =>
7171
awaitFuture(connection.connect) === connection
72-
}) (rootConfiguration)
72+
}) (configurationWithoutPassword)
7373
}
7474

7575
"connect to a MySQL instance without a database" in {

script/prepare_build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ mysql -u root -e 'create database mysql_async_tests;'
55
mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'mysql_async'@'localhost' IDENTIFIED BY 'root' WITH GRANT OPTION";
66
mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'mysql_async_old'@'localhost' WITH GRANT OPTION";
77
mysql -u root -e "UPDATE mysql.user SET Password = OLD_PASSWORD('do_not_use_this'), plugin = 'mysql_old_password' where User = 'mysql_async_old'; flush privileges;";
8+
mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'mysql_async_nopw'@'localhost' WITH GRANT OPTION";
89

910
echo "preparing postgresql configs"
1011

0 commit comments

Comments
 (0)