para_bellum

Export relational database structure to pdf

May 15th, 2013
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.65 KB | None | 0 0
  1. 1/ Créer une table « phpmyadmin » et y insérer les tables présentes dans ./example/create_tables.sql
  2. http://localhost/phpmyadmin/Documentation.html#linked-tables
  3.  
  4. 2/ Créer un utilisateur « pma » et lui donner les droit sur la bdd phpmyadmin :
  5. #########################
  6. GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';
  7. GRANT SELECT (
  8. Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv,
  9. Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv,
  10. File_priv, Grant_priv, References_priv, Index_priv, Alter_priv,
  11. Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv,
  12. Execute_priv, Repl_slave_priv, Repl_client_priv
  13. ) ON mysql.user TO 'pma'@'localhost';
  14. GRANT SELECT ON mysql.db TO 'pma'@'localhost';
  15. GRANT SELECT ON mysql.host TO 'pma'@'localhost';
  16. GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)
  17. ON mysql.tables_priv TO 'pma'@'localhost';
  18. #########################
  19. http://localhost/phpmyadmin/Documentation.html#pmausr
  20.  
  21. 3/ Mettre config.inc.php à jour pour qu'il ressemble à un truc du genre :
  22. #########################
  23. <?php
  24.  
  25. $cfg['blowfish_secret'] = 'wamp';#Base de génération pour le cookie
  26. /* Servers configuration */
  27. $i = 0;
  28.  
  29. /* Server: localhost [1] */
  30. $i++;
  31. $cfg['Servers'][$i]['verbose'] = 'localhost';
  32. $cfg['Servers'][$i]['host'] = 'localhost';
  33. $cfg['Servers'][$i]['port'] = '';
  34. $cfg['Servers'][$i]['socket'] = '';
  35. $cfg['Servers'][$i]['connect_type'] = 'tcp';
  36. $cfg['Servers'][$i]['extension'] = 'mysqli';
  37. #$cfg['Servers'][$i]['auth_type'] = 'config';
  38. $cfg['Servers'][$i]['auth_type'] = 'cookie';
  39. $cfg['Servers'][$i]['user'] = 'root';
  40. $cfg['Servers'][$i]['password'] = '';
  41. $cfg['Servers'][$i]['AllowNoPassword'] = true;
  42.  
  43. /* End of servers configuration */
  44.  
  45. $cfg['DefaultLang'] = 'en-utf-8';
  46. #$cfg['ServerDefault'] = 1;
  47. #$cfg['UploadDir'] = '';
  48. #$cfg['SaveDir'] = '';
  49.  
  50.  
  51. /* rajk - for blobstreaming */
  52. $cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
  53. $cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
  54. $cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
  55. $cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
  56.  
  57. $cfg['UploadDir'] = 'C:\wamp\sql_dump';
  58. $cfg['SaveDir'] = 'C:\wamp\save';
  59. $cfg['ExecTimeLimit'] = 0;
  60.  
  61. $cfg['Servers'][$i]['controluser'] = 'pma';
  62. $cfg['Servers'][$i]['controlpass'] = 'G0ldorak';
  63.  
  64. $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
  65. $cfg['Servers'][$i]['relation'] = 'pma_relation';
  66. $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
  67. $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
  68. $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
  69. $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
  70. $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
  71. $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
  72. $cfg['Servers'][$i]['history'] = 'pma_history';
  73. $cfg['Servers'][$i]['recent'] = 'pma_recent';
  74. $cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';
  75. $cfg['Servers'][$i]['tracking'] = 'pma_tracking';
  76. $cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
  77.  
  78. ?>
  79. ###############################
  80.  
  81. 4/ Se reconnecter à PHPMyAmdin pour recharger le fichier de config.
  82.  
  83. 5/ Sélectionner une table puis aller dans « Designer » (« Concepteur »).
  84.  
  85. 6/ Arranger la mise en page et sauvegarder, puis exporter vers un pdf.
  86.  
  87. 7/ Création de la page pdf.
  88.  
  89. 8/ Aller dans « Operations » (Opérations) et cliquer tout en bas sur « Edit or export relational schema » (« Éditer ou exporter un schéma relationnel »).
  90.  
  91. 9/ Choisir la page à éditer et scroller tout en bas vers le dernier encadré « Display relational schema » (« Afficher le schéma relationnel »).
  92.  
  93. 10/ ???
  94.  
  95. 11/ PROFIT
Advertisement
Add Comment
Please, Sign In to add comment