]> git.pld-linux.org Git - packages/mysql.git/blob - mysql-system-users.patch
move status action to status function
[packages/mysql.git] / mysql-system-users.patch
1 --- mysql-5.0.56/scripts/mysql_system_tables_data.sql~  2008-04-07 16:50:17.000000000 +0300
2 +++ mysql-5.0.56/scripts/mysql_system_tables_data.sql   2008-04-07 16:51:47.088186136 +0300
3 @@ -7,22 +7,13 @@
4  -- containing "@current_hostname" are filtered out by mysql_install_db.
5  set @current_hostname= @@hostname;
6  
7 -
8 --- Fill "db" table with default grants for anyone to
9 --- access database 'test' and 'test_%' if "db" table didn't exist
10 -CREATE TEMPORARY TABLE tmp_db LIKE db;
11 -INSERT INTO tmp_db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N');
12 -INSERT INTO tmp_db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N');
13 -INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0;
14 -DROP TABLE tmp_db;
15 -
16 -
17  -- Fill "users" table with default users allowing root access
18  -- from local machine if "users" table didn't exist before
19  CREATE TEMPORARY TABLE tmp_user LIKE user;
20 -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','','','','',0,0,0,0);
21 -REPLACE INTO tmp_user SELECT @current_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','','','','',0,0,0,0 FROM dual WHERE LOWER( @current_hostname) != 'localhost';
22 -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','','','','',0,0,0,0);
23 +INSERT INTO tmp_user VALUES ('localhost','mysql','','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);
24 +REPLACE INTO tmp_user SELECT @current_hostname,'mysql','','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 FROM dual WHERE LOWER( @current_hostname) != 'localhost';
25 +REPLACE INTO tmp_user VALUES ('127.0.0.1','mysql','','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);
26 +INSERT INTO tmp_user set Host='localhost',User='mysql_sysadmin',Password='',Reload_priv='Y',Shutdown_priv='Y';
27  INSERT INTO tmp_user (host,user) VALUES ('localhost','');
28  INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE LOWER(@current_hostname ) != 'localhost';
29  INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
This page took 0.043616 seconds and 3 git commands to generate.