Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Jul 3, 2024
1 parent b76a9bf commit a11e43f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugins/mysql-apt/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -1511,8 +1511,8 @@ def resetDbRootPwd(version):
pwd = mw.getRandomString(16)

pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,))

if float(version) < 5.7:
mdb8 = getMdb8Ver()
if not mw.inArray(mdb8, version):
cmd_pass = serverdir + '/bin/usr/bin/mysql --defaults-file=' + myconf + ' -uroot -e'
cmd_pass = cmd_pass + '"UPDATE mysql.user SET password=PASSWORD(\'' + pwd + "') WHERE user='root';"
cmd_pass = cmd_pass + 'flush privileges;"'
Expand Down
3 changes: 2 additions & 1 deletion plugins/mysql-yum/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,8 @@ def resetDbRootPwd(version):

pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,))

if float(version) < 5.7:
mdb8 = getMdb8Ver()
if not mw.inArray(mdb8, version):
cmd_pass = serverdir + '/bin/usr/bin/mysql --defaults-file=' + myconf + ' -uroot -e'
cmd_pass = cmd_pass + '"UPDATE mysql.user SET password=PASSWORD(\'' + pwd + "') WHERE user='root';"
cmd_pass = cmd_pass + 'flush privileges;"'
Expand Down
3 changes: 2 additions & 1 deletion plugins/mysql/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -1721,7 +1721,8 @@ def resetDbRootPwd(version):

pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,))

if float(version) < 5.7:
mdb8 = getMdb8Ver()
if not mw.inArray(mdb8, version):
cmd_pass = serverdir + '/bin/mysql --defaults-file=' + myconf + ' -uroot -e'
cmd_pass = cmd_pass + '"UPDATE mysql.user SET password=PASSWORD(\'' + pwd + "') WHERE user='root';"
cmd_pass = cmd_pass + 'flush privileges;"'
Expand Down

0 comments on commit a11e43f

Please sign in to comment.