Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
howto:fix_self_corrupt_mysql [2016/07/28 17:28]
bram
howto:fix_self_corrupt_mysql [2016/07/28 17:34]
bram
Line 95: Line 95:
     ​     ​
     # and to recreate agendav user     # and to recreate agendav user
-    insert into user values('​localhost','​agendav',​ PASSWORD('​put the password here'​),'​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','','','','',​0,​0,​0,​0,​NULL,'','​N','​N'​);​+    insert into user values('​localhost','​agendav',​ PASSWORD('​put the password here'​),'​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','','','','',​0,​0,​0,​0,​''​,'','​N','​N'​);​
     GRANT ALL PRIVILEGES ON agendav.* TO '​agendav'​@localhost;​     GRANT ALL PRIVILEGES ON agendav.* TO '​agendav'​@localhost;​
     ​     ​
Line 103: Line 103:
     # you can try a bash script like that:     # you can try a bash script like that:
     # BUT I HAVEN'​T TESTED IT     # BUT I HAVEN'​T TESTED IT
-    for i in app1 app2 app3; do mysql -p$(cat /​etc/​yunohost/​mysql) mysql -e "​insert into user values('​localhost','​$i',​ PASSWORD('​$(yunohost app setting $i mysqlpwd)'​),'​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','','','','',​0,​0,​0,​0,​NULL,'','​N','​N'​);​ GRANT ALL PRIVILEGES ON $i.* TO '​$i'​@localhost;";​ done; mysql -p$(cat /​etc/​yunohost/​mysql) mysql -e "FLUSH PRIVILEGES;"​+    for i in app1 app2 app3; do mysql -p$(cat /​etc/​yunohost/​mysql) mysql -e "​insert into user values('​localhost','​$i',​ PASSWORD('​$(yunohost app setting $i mysqlpwd)'​),'​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','​N','','','','',​0,​0,​0,​0,​''​,'','​N','​N'​);​ GRANT ALL PRIVILEGES ON $i.* TO '​$i'​@localhost;";​ done; mysql -p$(cat /​etc/​yunohost/​mysql) mysql -e "FLUSH PRIVILEGES;"​
  
  • howto/fix_self_corrupt_mysql.txt
  • Last modified: 2019/05/20 01:06
  • by tierce