|
|
@ -14,8 +14,9 @@ DROP TABLE tmp_db; |
|
|
-- Fill "users" table with default users allowing root access |
|
|
-- Fill "users" table with default users allowing root access |
|
|
-- from local machine if "users" table didn't exist before |
|
|
-- from local machine if "users" table didn't exist before |
|
|
CREATE TEMPORARY TABLE tmp_user LIKE user; |
|
|
CREATE TEMPORARY TABLE tmp_user LIKE user; |
|
|
|
|
|
set @hostname= @@hostname; |
|
|
INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); |
|
|
INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); |
|
|
REPLACE INTO tmp_user VALUES (@@hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); |
|
|
|
|
|
|
|
|
REPLACE INTO tmp_user VALUES (@hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); |
|
|
REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); |
|
|
REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); |
|
|
INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0; |
|
|
INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0; |
|
|
DROP TABLE tmp_user; |
|
|
DROP TABLE tmp_user; |