Skip to content

Commit c695b6f

Browse files
change how username is changed
1 parent bf45700 commit c695b6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/Executor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ class Executor {
431431
let initText = `CREATE DATABASE ${options.dbName};`;
432432

433433
if (options.username !== 'root') {
434-
initText += `\nRENAME USER 'root'@'localhost' TO '${options.username}'@'localhost';`
434+
initText += `\nCREATE USER '${options.username}'@'localhost';\nGRANT ALL ON *.* TO '${options.username}'@'localhost' WITH GRANT OPTION;`
435435
}
436436

437437
if (options.initSQLString.length > 0) {

0 commit comments

Comments
 (0)