home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / mysql / share / mysql_system_tables_data.sql < prev    next >
Encoding:
Text File  |  2008-04-17  |  1.4 KB  |  24 lines

  1. --
  2. -- The inital data for system tables of MySQL Server
  3. --
  4.  
  5. -- Fill "db" table with default grants for anyone to
  6. -- access database 'test' and 'test_%' if "db" table didn't exist
  7. CREATE TEMPORARY TABLE tmp_db LIKE db;
  8. INSERT INTO tmp_db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N');
  9. INSERT INTO tmp_db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N');
  10. INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0;
  11. DROP TABLE tmp_db;
  12.  
  13.  
  14. -- Fill "users" table with default users allowing root access
  15. -- from local machine if "users" table didn't exist before
  16. CREATE TEMPORARY TABLE tmp_user LIKE user;
  17. 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);
  18. 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','','','','',0,0,0,0);
  19. 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);
  20. INSERT INTO tmp_user (host,user) VALUES ('localhost','');
  21. INSERT INTO tmp_user (host,user) VALUES (@@hostname,'');
  22. INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
  23. DROP TABLE tmp_user;
  24.