Skip to content

Commit 9ce165b

Browse files
author
Gaetano Giunta
committed
add a prefix for temp db names to ease their removal
1 parent e9eed1c commit 9ce165b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/Command/SqlExecute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
6666
}
6767

6868
/// @todo inject more randomness in the username, by allowing more chars than bin2hex produces
69-
$userName = bin2hex(random_bytes(8)); // old mysql versions have a limitation of 16 chars for usernames
69+
$userName = 'db3v4l_' . substr(bin2hex(random_bytes(5)), 0, 9); // some mysql versions have a limitation of 16 chars for usernames
7070
$password = bin2hex(random_bytes(16));
7171
//$dbName = bin2hex(random_bytes(31));
7272
$dbName = null; // $userName will be used as db name

0 commit comments

Comments
 (0)