Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
centos:web_c7:phpmyadmin [29.01.2015 18:05. ] – [Datenbank(tabellen) erstellen] djangocentos:web_c7:phpmyadmin [22.07.2019 14:43. ] (aktuell) django
Zeile 2: Zeile 2:
 {{:centos:web_c7:phpmyadmin-logo.png?nolink&175 |Bild: phpMyAdmin Logo}} {{:centos:web_c7:phpmyadmin-logo.png?nolink&175 |Bild: phpMyAdmin Logo}}
 \\ \\ \\ \\
-Zur komfortablen Administration unseres [[centos:mysql|mySQL-Datenbankserver unter CentOS 7.x]] greifen wir auf das PHP-Projekt [[http://phpmyadmin.sourceforge.net/|phpMyAdmin]] zurück.+Zur komfortablen Administration unseres [[centos:mariadb|MariaDB-Datenbankserver unter CentOS 7.x]] greifen wir auf das PHP-Projekt [[http://phpmyadmin.sourceforge.net/|phpMyAdmin]] zurück.
  
 ===== Installation ===== ===== Installation =====
Zeile 1417: Zeile 1417:
 </code> </code>
  
-===== Konfiguration =====+===== grundlegende Konfiguration =====
 ==== Apache vHOST ==== ==== Apache vHOST ====
  Im ersten Konfigurationsbeispiel richten wir uns einen vHOST für unseren Apache-Webserver ein. Hier wurde bei der Installation bereits eine passende Konfigurationsdatei in den Apache-Konfigurationspfad eingestellt. Diese Konfigurationsdatei passen wir unseren Gegebenheiten entsprechend an.  Im ersten Konfigurationsbeispiel richten wir uns einen vHOST für unseren Apache-Webserver ein. Hier wurde bei der Installation bereits eine passende Konfigurationsdatei in den Apache-Konfigurationspfad eingestellt. Diese Konfigurationsdatei passen wir unseren Gegebenheiten entsprechend an.
Zeile 1572: Zeile 1572:
 | mysql              | | mysql              |
 | opendmarc          | | opendmarc          |
-| opendocman         | 
 | phpmyadmin         | | phpmyadmin         |
 | postfix            | | postfix            |
Zeile 1626: Zeile 1625:
   - **neuen Benutzer anlegen** \\ Mit folgendem Befehl legen wir uns einen neuen Nutzer an: \\ <code>MariaDB> CREATE USER 'controluser'@'vml000097.dmz.nausch.org' IDENTIFIED BY 'controlpassword';</code><code>Query OK, 0 rows affected (0.00 sec)</code> sowie \\ <code>MariaDB> CREATE USER 'controluser'@'10.0.0.97' IDENTIFIED BY 'controlpassword';</code><code>Query OK, 0 rows affected (0.00 sec)</code>   - **neuen Benutzer anlegen** \\ Mit folgendem Befehl legen wir uns einen neuen Nutzer an: \\ <code>MariaDB> CREATE USER 'controluser'@'vml000097.dmz.nausch.org' IDENTIFIED BY 'controlpassword';</code><code>Query OK, 0 rows affected (0.00 sec)</code> sowie \\ <code>MariaDB> CREATE USER 'controluser'@'10.0.0.97' IDENTIFIED BY 'controlpassword';</code><code>Query OK, 0 rows affected (0.00 sec)</code>
   - **Datenbankverbindung beenden** \\ Unsere Konfiguration unseres neuen Datenbanknutzers ist hiermit beendet und wir können die Verbindung zur Datenbank wieder schließen. \\ <code>MariaDB> exit</code><code>Bye</code>   - **Datenbankverbindung beenden** \\ Unsere Konfiguration unseres neuen Datenbanknutzers ist hiermit beendet und wir können die Verbindung zur Datenbank wieder schließen. \\ <code>MariaDB> exit</code><code>Bye</code>
 +
 +
 +=== Datenbank(tabellen) erstellen ===
 +Zum Erstellen der benötigten Tabelle greifen wir auf die Datei //**/usr/share/phpMyAdmin/examples/create_tables.sql**// zurück. Diese Musterdatei kopieren wir uns zunächst in das Verzeichnis //**/root/**//.
 +   # cp /usr/share/phpMyAdmin/sql/create_tables.sql /root/create_pmadb_tables.sql
 +
 +<WRAP round important> \\ Vor dem Start des Scriptes, muss dieses unbedingt noch den lokalen Gegebenheiten nach angepasst werden!</WRAP>
 +
 +Anschließend passen wir den Inhalt unseren lokalen Gegebenheiten an.
 +   # vim /root/create_pmadb_tables.sql
 +
 +Hier fügen wir beim Abschnitt **//-- Privileges//** folgende Zeilen ein:
 +<code sql>- --------------------------------------------------------
 +
 +--
 +-- Privileges
 +--
 +-- (activate this statement if necessary)
 +-- GRANT SELECT, INSERT, DELETE, UPDATE, ALTER ON `phpmyadmin`.* TO
 +--    'pma'@localhost;
 +
 +-- Grant privileges to phpMyAdmin controluser.
 +GRANT SELECT, INSERT, DELETE, UPDATE, ALTER ON `phpmyadmin`.* TO 'controluser'@'10.0.0.97';
 +GRANT SELECT, INSERT, DELETE, UPDATE, ALTER ON `phpmyadmin`.* TO 'controluser'@'vml000097.dmz.nausch.org';
 +
 +-- Reload privileges.
 +FLUSH PRIVILEGES;
 +
 +-- --------------------------------------------------------
 +</code>
 +
 +Somit ergibt sich folgende komplette Datei.
 +<file sql /root/create_pmadb_tables.sql>-- --------------------------------------------------------             
 +-- SQL Commands to set up the pmadb as described in the documentation.  
 +--                                                                      
 +-- This file is meant for use with MySQL 5 and above!                   
 +--                                                                      
 +-- This script expects the user pma to already be existing. If we would put a
 +-- line here to create him too many users might just use this script and end 
 +-- up with having the same password for the controluser.                     
 +--                                                                           
 +-- This user "pma" must be defined in config.inc.php (controluser/controlpass)
 +--                                                                            
 +-- Please don't forget to set up the tablenames in config.inc.php             
 +--                                                                            
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Database : `phpmyadmin`
 +--                        
 +CREATE DATABASE IF NOT EXISTS `phpmyadmin`
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
 +USE phpmyadmin;                               
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Privileges
 +--           
 +-- (activate this statement if necessary)
 +-- GRANT SELECT, INSERT, DELETE, UPDATE, ALTER ON `phpmyadmin`.* TO
 +--    'pma'@localhost;                                             
 +
 +-- Grant privileges to phpMyAdmin controluser.
 +GRANT SELECT, INSERT, DELETE, UPDATE, ALTER ON `phpmyadmin`.* TO 'controluser'@'10.0.0.97';
 +GRANT SELECT, INSERT, DELETE, UPDATE, ALTER ON `phpmyadmin`.* TO 'controluser'@'vml000097.dmz.nausch.org';
 +
 +-- Reload privileges.
 +FLUSH PRIVILEGES;
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Table structure for table `pma__bookmark`
 +--                                          
 +
 +CREATE TABLE IF NOT EXISTS `pma__bookmark` (
 +  `id` int(11) NOT NULL auto_increment,     
 +  `dbase` varchar(255) NOT NULL default '', 
 +  `user` varchar(255) NOT NULL default '',  
 +  `label` varchar(255) COLLATE utf8_general_ci NOT NULL default '',
 +  `query` text NOT NULL,                                           
 +  PRIMARY KEY  (`id`)                                              
 +)                                                                  
 +  COMMENT='Bookmarks'                                              
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;                     
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Table structure for table `pma__column_info`
 +--                                             
 +
 +CREATE TABLE IF NOT EXISTS `pma__column_info` (
 +  `id` int(5) unsigned NOT NULL auto_increment,
 +  `db_name` varchar(64) NOT NULL default '',   
 +  `table_name` varchar(64) NOT NULL default '',
 +  `column_name` varchar(64) NOT NULL default '',
 +  `comment` varchar(255) COLLATE utf8_general_ci NOT NULL default '',
 +  `mimetype` varchar(255) COLLATE utf8_general_ci NOT NULL default '',
 +  `transformation` varchar(255) NOT NULL default '',                  
 +  `transformation_options` varchar(255) NOT NULL default '',          
 +  `input_transformation` varchar(255) NOT NULL default '',            
 +  `input_transformation_options` varchar(255) NOT NULL default '',    
 +  PRIMARY KEY  (`id`),                                                
 +  UNIQUE KEY `db_name` (`db_name`,`table_name`,`column_name`)         
 +)                                                                     
 +  COMMENT='Column information for phpMyAdmin'                         
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;                        
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Table structure for table `pma__history`
 +--                                         
 +
 +CREATE TABLE IF NOT EXISTS `pma__history` (
 +  `id` bigint(20) unsigned NOT NULL auto_increment,
 +  `username` varchar(64) NOT NULL default '',      
 +  `db` varchar(64) NOT NULL default '',            
 +  `table` varchar(64) NOT NULL default '',         
 +  `timevalue` timestamp NOT NULL,                  
 +  `sqlquery` text NOT NULL,                        
 +  PRIMARY KEY  (`id`),                             
 +  KEY `username` (`username`,`db`,`table`,`timevalue`)
 +)                                                     
 +  COMMENT='SQL history for phpMyAdmin'                
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;        
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Table structure for table `pma__pdf_pages`
 +--                                           
 +
 +CREATE TABLE IF NOT EXISTS `pma__pdf_pages` (
 +  `db_name` varchar(64) NOT NULL default '', 
 +  `page_nr` int(10) unsigned NOT NULL auto_increment,
 +  `page_descr` varchar(50) COLLATE utf8_general_ci NOT NULL default '',
 +  PRIMARY KEY  (`page_nr`),                                            
 +  KEY `db_name` (`db_name`)                                            
 +)                                                                      
 +  COMMENT='PDF relation pages for phpMyAdmin'                          
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;                         
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Table structure for table `pma__recent`
 +--                                        
 +
 +CREATE TABLE IF NOT EXISTS `pma__recent` (
 +  `username` varchar(64) NOT NULL,        
 +  `tables` text NOT NULL,                 
 +  PRIMARY KEY (`username`)                
 +)                                         
 +  COMMENT='Recently accessed tables'      
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Table structure for table `pma__favorite`
 +--                                          
 +
 +CREATE TABLE IF NOT EXISTS `pma__favorite` (
 +  `username` varchar(64) NOT NULL,          
 +  `tables` text NOT NULL,                   
 +  PRIMARY KEY (`username`)                  
 +)                                           
 +  COMMENT='Favorite tables'                 
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Table structure for table `pma__table_uiprefs`
 +--                                               
 +
 +CREATE TABLE IF NOT EXISTS `pma__table_uiprefs` (
 +  `username` varchar(64) NOT NULL,               
 +  `db_name` varchar(64) NOT NULL,                
 +  `table_name` varchar(64) NOT NULL,             
 +  `prefs` text NOT NULL,                         
 +  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 +  PRIMARY KEY (`username`,`db_name`,`table_name`)                                        
 +)                                                                                        
 +  COMMENT='Tables'' UI preferences'                                                      
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;                                           
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Table structure for table `pma__relation`
 +--                                          
 +
 +CREATE TABLE IF NOT EXISTS `pma__relation` (
 +  `master_db` varchar(64) NOT NULL default '',
 +  `master_table` varchar(64) NOT NULL default '',
 +  `master_field` varchar(64) NOT NULL default '',
 +  `foreign_db` varchar(64) NOT NULL default '',  
 +  `foreign_table` varchar(64) NOT NULL default '',
 +  `foreign_field` varchar(64) NOT NULL default '',
 +  PRIMARY KEY  (`master_db`,`master_table`,`master_field`),
 +  KEY `foreign_field` (`foreign_db`,`foreign_table`)       
 +)                                                          
 +  COMMENT='Relation table'                                 
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;             
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Table structure for table `pma__table_coords`
 +--                                              
 +
 +CREATE TABLE IF NOT EXISTS `pma__table_coords` (
 +  `db_name` varchar(64) NOT NULL default '',    
 +  `table_name` varchar(64) NOT NULL default '', 
 +  `pdf_page_number` int(11) NOT NULL default '0',
 +  `x` float unsigned NOT NULL default '0',       
 +  `y` float unsigned NOT NULL default '0',       
 +  PRIMARY KEY  (`db_name`,`table_name`,`pdf_page_number`)
 +)                                                        
 +  COMMENT='Table coordinates for phpMyAdmin PDF output'  
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;           
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Table structure for table `pma__table_info`
 +--                                            
 +
 +CREATE TABLE IF NOT EXISTS `pma__table_info` (
 +  `db_name` varchar(64) NOT NULL default '',  
 +  `table_name` varchar(64) NOT NULL default '',
 +  `display_field` varchar(64) NOT NULL default '',
 +  PRIMARY KEY  (`db_name`,`table_name`)           
 +)                                                 
 +  COMMENT='Table information for phpMyAdmin'      
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;    
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Table structure for table `pma__tracking`
 +--                                          
 +
 +CREATE TABLE IF NOT EXISTS `pma__tracking` (
 +  `db_name` varchar(64) NOT NULL,           
 +  `table_name` varchar(64) NOT NULL,        
 +  `version` int(10) unsigned NOT NULL,      
 +  `date_created` datetime NOT NULL,         
 +  `date_updated` datetime NOT NULL,         
 +  `schema_snapshot` text NOT NULL,          
 +  `schema_sql` text,                        
 +  `data_sql` longtext,                      
 +  `tracking` set('UPDATE','REPLACE','INSERT','DELETE','TRUNCATE','CREATE DATABASE','ALTER DATABASE','DROP DATABASE','CREATE TABLE','ALTER TABLE','RENAME TABLE','DROP TABLE','CREATE INDEX','DROP INDEX','CREATE VIEW','ALTER VIEW','DROP VIEW') default NULL,                                                            
 +  `tracking_active` int(1) unsigned NOT NULL default '1',                                                                                                    
 +  PRIMARY KEY  (`db_name`,`table_name`,`version`)                                                                                                            
 +)                                                                                                                                                            
 +  COMMENT='Database changes tracking for phpMyAdmin'                                                                                                         
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;                                                                                                               
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Table structure for table `pma__userconfig`
 +--                                            
 +
 +CREATE TABLE IF NOT EXISTS `pma__userconfig` (
 +  `username` varchar(64) NOT NULL,            
 +  `timevalue` timestamp NOT NULL,             
 +  `config_data` text NOT NULL,                
 +  PRIMARY KEY  (`username`)                   
 +)                                             
 +  COMMENT='User preferences storage for phpMyAdmin'
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;     
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Table structure for table `pma__users`
 +--                                       
 +
 +CREATE TABLE IF NOT EXISTS `pma__users` (
 +  `username` varchar(64) NOT NULL,       
 +  `usergroup` varchar(64) NOT NULL,      
 +  PRIMARY KEY (`username`,`usergroup`)   
 +)                                        
 +  COMMENT='Users and their assignments to user groups'
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;        
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Table structure for table `pma__usergroups`
 +--                                            
 +
 +CREATE TABLE IF NOT EXISTS `pma__usergroups` (
 +  `usergroup` varchar(64) NOT NULL,           
 +  `tab` varchar(64) NOT NULL,                 
 +  `allowed` enum('Y','N') NOT NULL DEFAULT 'N',
 +  PRIMARY KEY (`usergroup`,`tab`,`allowed`)    
 +)                                              
 +  COMMENT='User groups with configured menu items'
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;    
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Table structure for table `pma__navigationhiding`
 +--                                                  
 +
 +CREATE TABLE IF NOT EXISTS `pma__navigationhiding` (
 +  `username` varchar(64) NOT NULL,                  
 +  `item_name` varchar(64) NOT NULL,                 
 +  `item_type` varchar(64) NOT NULL,                 
 +  `db_name` varchar(64) NOT NULL,                   
 +  `table_name` varchar(64) NOT NULL,                
 +  PRIMARY KEY (`username`,`item_name`,`item_type`,`db_name`,`table_name`)
 +)                                                                        
 +  COMMENT='Hidden items of navigation tree'                              
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;                           
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Table structure for table `pma__savedsearches`
 +--                                               
 +
 +CREATE TABLE IF NOT EXISTS `pma__savedsearches` (
 +  `id` int(5) unsigned NOT NULL auto_increment,  
 +  `username` varchar(64) NOT NULL default '',    
 +  `db_name` varchar(64) NOT NULL default '',     
 +  `search_name` varchar(64) NOT NULL default '', 
 +  `search_data` text NOT NULL,                   
 +  PRIMARY KEY  (`id`),                           
 +  UNIQUE KEY `u_savedsearches_username_dbname` (`username`,`db_name`,`search_name`)
 +)                                                                                  
 +  COMMENT='Saved searches'                                                         
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;                                     
 +
 +-- --------------------------------------------------------
 +
 +--
 +-- Table structure for table `pma__central_columns`
 +--                                                 
 +
 +CREATE TABLE IF NOT EXISTS `pma__central_columns` (
 +  `db_name` varchar(64) NOT NULL,                  
 +  `col_name` varchar(64) NOT NULL,                 
 +  `col_type` varchar(64) NOT NULL,                 
 +  `col_length` text,                               
 +  `col_collation` varchar(64) NOT NULL,            
 +  `col_isNull` boolean NOT NULL,                   
 +  `col_extra` varchar(255) default '',             
 +  `col_default` text,                              
 +  PRIMARY KEY (`db_name`,`col_name`)               
 +)                                                  
 +  COMMENT='Central list of columns'                
 +  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
 +</file>
 +
 +Unser angepasstes Script laden wir dann auf unserem Datenbankhost mit nachfolgendem Befehl.
 +   # mysql -h 127.0.0.1 -u root -p < /root/create_pmadb_tables.sql
 +
 +   Enter password:
 +
 +
 +
 +
 +
 +
 +=== Zugriff testen ===
 +Zum Schluß überprüfen wir, ob der zuvor angelegt User/Zugang auch vom Webserver aus funktioniert. 
 +   # mysql -h mysql.dmz.nausch.org -D phpmyadmin -u controluser -p
 +
 +<code>Enter password:
 +Welcome to the MariaDB monitor.  Commands end with ; or \g.
 +Your MySQL connection id is 14121972
 +Server version: 5.1.73 Source distribution
 +
 +Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.
 +
 +Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 +
 +MariaDB [(none)]>
 +</code>
 +   MariaDB [(none)]> show tables;
 +<code>+-----------------------+
 +| Tables_in_phpmyadmin  |
 ++-----------------------+
 +| pma__bookmark         |
 +| pma__central_columns  |
 +| pma__column_info      |
 +| pma__favorite         |
 +| pma__history          |
 +| pma__navigationhiding |
 +| pma__pdf_pages        |
 +| pma__recent           |
 +| pma__relation         |
 +| pma__savedsearches    |
 +| pma__table_coords     |
 +| pma__table_info       |
 +| pma__table_uiprefs    |
 +| pma__tracking         |
 +| pma__userconfig       |
 +| pma__usergroups       |
 +| pma__users            |
 ++-----------------------+
 +17 rows in set (0.00 sec)
 +
 +MariaDB [(none)]>
 +</code>
 +
 +Da der Test positiv ausgefallen ist, können wie uns wieder von unserem Datenbankserver abmelden.
 +   MariaDB [(none)]> quit
 +
 +   Bye
 +
 +
 +
 +
  
  
 ===== Anwendungskonfiguration ===== ===== Anwendungskonfiguration =====
 ==== manueller Weg ==== ==== manueller Weg ====
-Möchte man die PHP-Anwendung per Hand editieren beutzt man seinen Editor der Wahl, so z.B. **vim** +Möchte man die PHP-Anwendung per Hand editieren benutzt man seinen Editor der Wahl. Hilfreiche Informationen zu den möglichen Konfigurationsoptionen findet man dazu in der Onlinedokumentation im Verzeichnis //**doc/html/**//also erreichbar über http://phpmyadmin.nausch.org/doc/html/index.html 
 +   $ firefox http://phpmyadmin.nausch.org/doc/html/index.html 
 + 
 +Zum Bearbeiten der Konfigurationsdatei nutzen wir z.B. **vim**.
    # vim /etc/phpMyAdmin/config.inc.php    # vim /etc/phpMyAdmin/config.inc.php
  
-<file php /etc/phpMyAdmin/config.inc.php><?php                                                                                                                                                      +<file php /etc/phpMyAdmin/config.inc.php><?php 
-/**                                                                                                                                                        +/** 
- * phpMyAdmin configuration file, you can use it as base for the manual                                                                                    + * phpMyAdmin configuration file, you can use it as base for the manual 
- * configuration. For easier setup you can use "setup/"                                                                                                  + * configuration. For easier setup you can use "setup/"
-                                                                                                                                                         + *  
- * All directives are explained in Documentation.html and on phpMyAdmin                                                                                    + * All directives are explained in Documentation.html and on phpMyAdmin 
- * wiki <http://wiki.phpmyadmin.net>                                                                                                                     + * wiki <http://wiki.phpmyadmin.net>
- */                                                                                                                                                       + */
  
 /* /*
  * This is needed for cookie based authentication to encrypt password in  * This is needed for cookie based authentication to encrypt password in
- * cookie                                                                + * cookie 
- */                                                                     + */
 $cfg['blowfish_secret'] = '19670814514121972'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ $cfg['blowfish_secret'] = '19670814514121972'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
  
 /** /**
  * Server(s) configuration  * Server(s) configuration
- */                        + */ 
-$i = 0;                   +$i = 0;
  
 // The $cfg['Servers'] array starts with $cfg['Servers'][1].  Do not use // The $cfg['Servers'] array starts with $cfg['Servers'][1].  Do not use
 // $cfg['Servers'][0]. You can disable a server config entry by setting host // $cfg['Servers'][0]. You can disable a server config entry by setting host
-// to ''. If you want more than one server, just copy following section      +// to ''. If you want more than one server, just copy following section 
-// (including $i incrementation) serveral times. There is no need to define  +// (including $i incrementation) serveral times. There is no need to define 
-// full server array, just define values you need to change.                 +// full server array, just define values you need to change. 
-$i++;                                                                       +$i++;
 $cfg['Servers'][$i]['host'         = 'localhost'; // MySQL hostname or IP address $cfg['Servers'][$i]['host'         = 'localhost'; // MySQL hostname or IP address
 $cfg['Servers'][$i]['port'         = '';          // MySQL port - leave blank for default port $cfg['Servers'][$i]['port'         = '';          // MySQL port - leave blank for default port
 $cfg['Servers'][$i]['socket'       = '';          // Path to the socket - leave blank for default socket $cfg['Servers'][$i]['socket'       = '';          // Path to the socket - leave blank for default socket
-$cfg['Servers'][$i]['connect_type' = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket'+$cfg['Servers'][$i]['connect_type' = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')
 $cfg['Servers'][$i]['extension'    = 'mysqli';    // The php MySQL extension to use ('mysql' or 'mysqli') $cfg['Servers'][$i]['extension'    = 'mysqli';    // The php MySQL extension to use ('mysql' or 'mysqli')
-$cfg['Servers'][$i]['compress'     = FALSE;       // Use compressed protocol for the MySQL connection     +$cfg['Servers'][$i]['compress'     = FALSE;       // Use compressed protocol for the MySQL connection 
-                                                    // (requires PHP >= 4.3.0)                              +                                                    // (requires PHP >= 4.3.0) 
-$cfg['Servers'][$i]['controluser'  = '';          // MySQL control user settings                          +$cfg['Servers'][$i]['controluser'  = '';          // MySQL control user settings 
-                                                    // (this user must have read-only                       +                                                    // (this user must have read-only 
-$cfg['Servers'][$i]['controlpass'  = '';          // access to the "mysql/user"                           +$cfg['Servers'][$i]['controlpass'  = '';          // access to the "mysql/user" 
-                                                    // and "mysql/db" tables).                              +                                                    // and "mysql/db" tables). 
-                                                    // The controluser is also                              +                                                    // The controluser is also 
-                                                    // used for all relational                              +                                                    // used for all relational 
-                                                    // features (pmadb)                                    +                                                    // features (pmadb)
 $cfg['Servers'][$i]['auth_type'    = 'cookie';    // Authentication method (config, http or cookie based)? $cfg['Servers'][$i]['auth_type'    = 'cookie';    // Authentication method (config, http or cookie based)?
-$cfg['Servers'][$i]['user'         = '';          // MySQL user                                            +$cfg['Servers'][$i]['user'         = '';          // MySQL user 
-$cfg['Servers'][$i]['password'     = '';          // MySQL password (only needed                           +$cfg['Servers'][$i]['password'     = '';          // MySQL password (only needed 
-                                                    // with 'config' auth_type)                              +                                                    // with 'config' auth_type) 
-$cfg['Servers'][$i]['only_db'      = '';          // If set to a db-name, only                             +$cfg['Servers'][$i]['only_db'      = '';          // If set to a db-name, only 
-                                                    // this db is displayed in left frame                   +                                                    // this db is displayed in left frame
                                                     // It may also be an array of db-names, where sorting order is relevant.                                                     // It may also be an array of db-names, where sorting order is relevant.
-$cfg['Servers'][$i]['hide_db'      = '';          // Database name to be hidden from listings                              +$cfg['Servers'][$i]['hide_db'      = '';          // Database name to be hidden from listings 
-$cfg['Servers'][$i]['verbose'      = '';          // Verbose name for this host - leave blank to show the hostname        +$cfg['Servers'][$i]['verbose'      = '';          // Verbose name for this host - leave blank to show the hostname
  
 $cfg['Servers'][$i]['pmadb'        = '';          // Database used for Relation, Bookmark and PDF Features $cfg['Servers'][$i]['pmadb'        = '';          // Database used for Relation, Bookmark and PDF Features
-                                                    // (see scripts/create_tables.sql)                       +                                                    // (see scripts/create_tables.sql) 
-                                                    //   - leave blank for no support                        +                                                    //   - leave blank for no support 
-                                                    //     DEFAULT: 'phpmyadmin'                             +                                                    //     DEFAULT: 'phpmyadmin' 
-$cfg['Servers'][$i]['bookmarktable'] = '';          // Bookmark table                                        +$cfg['Servers'][$i]['bookmarktable'] = '';          // Bookmark table 
-                                                    //   - leave blank for no bookmark support               +                                                    //   - leave blank for no bookmark support 
-                                                    //     DEFAULT: 'pma_bookmark'                          +                                                    //     DEFAULT: 'pma_bookmark'
 $cfg['Servers'][$i]['relation'     = '';          // table to describe the relation between links (see doc) $cfg['Servers'][$i]['relation'     = '';          // table to describe the relation between links (see doc)
-                                                    //   - leave blank for no relation-links support          +                                                    //   - leave blank for no relation-links support 
-                                                    //     DEFAULT: 'pma_relation'                           +                                                    //     DEFAULT: 'pma_relation'
 $cfg['Servers'][$i]['table_info'   = '';          // table to describe the display fields $cfg['Servers'][$i]['table_info'   = '';          // table to describe the display fields
                                                     //   - leave blank for no display fields                                                     //   - leave blank for no display fields
Zeile 1700: Zeile 2126:
                                                     //     DEFAULT: 'pma_table_coords'                                                     //     DEFAULT: 'pma_table_coords'
 $cfg['Servers'][$i]['pdf_pages'    = '';          // table to describe pages of relationpd $cfg['Servers'][$i]['pdf_pages'    = '';          // table to describe pages of relationpd
-                                                    //   - leave blank if you don't want to +                                                    //   - leave blank if you don't want to
                                                     //     DEFAULT: 'pma_pdf_pages'                                                     //     DEFAULT: 'pma_pdf_pages'
 $cfg['Servers'][$i]['column_info'  = '';          // table to store column information $cfg['Servers'][$i]['column_info'  = '';          // table to store column information
Zeile 1750: Zeile 2176:
    $ firefox http://phpmyadmin.nausch.org/setup/    $ firefox http://phpmyadmin.nausch.org/setup/
  
-{{ :centos:web_c7:pma_001.png?direct&525 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}+{{ :centos:web_c7:pma_01.png?direct&525 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}
  
 Als erstes definieren wir unseren Datenbank-Server. Hierzu klicken wir auf die Schaltfläche **[ Neuer Server ]**. Als erstes definieren wir unseren Datenbank-Server. Hierzu klicken wir auf die Schaltfläche **[ Neuer Server ]**.
  
-{{ :centos:web_c7:pma_003.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}+{{ :centos:web_c7:pma_02.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}
  
-Haben wir die entsprechenden Daten eingegeben, klicken wir auf die grün markierte Schaltfläche **[ Übernehmen ]**. Anschließend speichern wir die erstellte Konfiguration mit einem Klick auf die Schaltfläche **[ Speichern ]**.+Haben wir die entsprechenden Daten eingegeben, klicken wir auf die grün markierte Schaltfläche **[ Übernehmen ]**. 
  
-{{ :centos:web_c7:pma_017.png?direct&726 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}+{{ :centos:web_c7:pma_03.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}
  
-Bei Bedarf können wir uns die erstellte und gespeicherte Konfigurationsdaten auch anzeigen lassen; \\ hierzu klicken wir auf die Schaltfläche **[ Anzeigen ]**.+Beim Reiter **Serverkonfiguration** können wir festlegen, wie wir auf den Server zugreifen und welche Datenbank(tabellen) angezeigt werden sollen. Den Haken **** beim Punkt **Erlaube root login** entfernen wir!
  
-{{ :centos:web_c7:pma_016.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}+{{ :centos:web_c7:pma_04.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}
  
-Die mit der Web-GUI erstellte Konfigurationsdatei finden wir im Verzeichnis //**/var/lib/phpMyAdmin/config/**//. +Die Einstellungen zum Konfigurationsspeicher **PMADB** legen wir auf dem Reiter **Konfigurationsspeicher** festDort tragen wir folgende (entsprechende individuelle) Werte ein.
-   # less /var/lib/phpMyAdmin/config/config.inc.php+
  
-<file php /var/lib/phpMyAdmin/config/config.inc.php><?php +  Datenbankname                                                                 phpmyadmin 
-/* +  pmadb Host                                                                    [             ] 
- * Generated configuration file +  Kontroll-Port                                                                             ] 
- * Generated byphpMyAdmin 4.3.6 setup script +  pmadb Benutzer                                                                controluser 
- * DateThu, 22 Jan 2015 12:02:20 +0100 +  pmadb Benutzer Passwort                                                       controlpassword 
- */+  Lesezeichen Tabelle                                                           pma__bookmark 
 +  Relation Tabelle                                                              pma__relation 
 +  Tabelle für Benutzereinstellungen                                             pma__userconfig 
 +  Benutzer-Tabelle                                                              pma__users 
 +  Benutzergruppen-Tabelle                                                       pma__usergroups 
 +  Tabelle für ausgeblendete Navigations-Elemente                                pma__navigationhiding 
 +  Tabelle für Anzeigespalten                                                    pma__table_info 
 +  Spalten Informationen Tabelle                                                 pma__column_info 
 +  SQL Abfragehistorien Tabelle                                                  pma__history 
 +  Kürzlich verwendete Tabellen                                                  pma__recent 
 +  Tabelle für Oberflächeneinstellungen                                          pma__table_uiprefs 
 +  Tabelle mit Verfolgung der SQL-Abfragen                                       pma__tracking 
 +  Designer- und PDF SchemaTabellenkoordinaten                                 pma__table_coords 
 +  PDF-SchemaSeiten-Tabelle                                                    pma__pdf_pages 
 +  Beispielabfragentabelle                                                       pma__savedsearches 
 +  Central columns tabele                                                        pma__central_columns 
 +  Maximale Anzahl der zu speichernden Tabelleneinstellungen                     100
  
-/* Servers configuration */ +{{ :centos:web_c7:pma_05.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}
-$i = 0;+
  
-/Server: mysql.dmz.nausch.org [1] *+Auf dem Reiter **Grundeinstellungen** setzen wir den Haken **✔** beim Punkt **Benutze SSL**.
-$i++; +
-$cfg['Servers'][$i]['verbose'] = ''; +
-$cfg['Servers'][$i]['host'] = 'mariadb.dmz.nausch.org'; +
-$cfg['Servers'][$i]['port'] = ''; +
-$cfg['Servers'][$i]['socket'] = ''; +
-$cfg['Servers'][$i]['connect_type'] = 'tcp'; +
-$cfg['Servers'][$i]['auth_type'] = 'cookie'; +
-$cfg['Servers'][$i]['user'] = 'root'; +
-$cfg['Servers'][$i]['password'] = '';+
  
-/* End of servers configuration */+{{ :centos:web_c7:pma_06.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}
  
-$cfg['blowfish_secret'] = '54c0b8d49cd537.48447377'; +Wie haben den Konfigurationspunkte **Übersicht** erfolgreich fertiggestellt. Nun Wählen wir den nächsten Konfigurationskapitel **Funktionen** am linken Bildschirmrand an.  
-$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload/'; +Auf dem Reiter **Import/Export** legen wir die beiden Verzeichnisse zum **Upload Verzeichnis** und **Speicher Verzeichnis** fest.
-$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save/'; +
-$cfg['ForceSSL'] = true; +
-$cfg['ServerLibraryDifference_DisableWarning'] = true; +
-$cfg['PmaNoRelation_DisableWarning'] = true; +
-$cfg['SuhosinDisableWarning'] = true; +
-$cfg['DefaultLang'] = 'de'; +
-$cfg['ServerDefault'] = 1; +
-?> +
-</file>+
  
-===== erweiterte Konfiguration =====+{{ :centos:web_c7:pma_08.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}
  
 +  Upload Verzeichnis                                                            /var/lib/phpMyAdmin/upload
 +  Speicher Verzeichnis                                                          /var/lib/phpMyAdmin/save
  
 +Auf den Reiter **Sicherheit** setzen wir den Haken **✔** beim Punkt **SSL-Verbindung erzwingen**.
  
-=== Zugriff testen === +{{ :centos:web_c7:pma_07.png?direct&726 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}
-Zum Schluß überprüfen wir, ob der zuvor angelegt User/Zugang auch vom Webserver aus funktioniert +
-   # mysql -h mysql.dmz.nausch.org -D phpmyadmin -u controluser -p+
  
-<code>Enter password: +Beim Konfigurationskapitel **SQL-Abfragen** setzen wir den  **✔** beim Punkt **Abfragelog speichern**.
-Welcome to the MariaDB monitor.  Commands end with ; or \g. +
-Your MySQL connection id is 14121972 +
-Server version: 5.1.73 Source distribution+
  
-Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.+{{ :centos:web_c7:pma_10.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}
  
-Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.+Auf den Reitern des Konfigurationskapitel **Navigationspanel** übernehmen wir die Defaultwerte.
  
-MariaDB [(none)]> +Reiter **Navigationspanel**:
-</code> +
-   MariaDB [(none)]> show tables; +
-<code>+-----------------------+ +
-| Tables_in_phpmyadmin +
-+-----------------------+ +
-| pma__bookmark         | +
-| pma__central_columns +
-| pma__column_info      | +
-| pma__favorite         | +
-| pma__history          | +
-| pma__navigationhiding | +
-| pma__pdf_pages        | +
-| pma__recent           | +
-| pma__relation         | +
-| pma__savedsearches    | +
-| pma__table_coords     | +
-| pma__table_info       | +
-| pma__table_uiprefs    | +
-| pma__tracking         | +
-| pma__userconfig       | +
-| pma__usergroups       | +
-| pma__users            | +
-+-----------------------+ +
-17 rows in set (0.00 sec)+
  
-MariaDB [(none)]> +{{ :centos:web_c7:pma_11.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}
-</code>+
  
-Da der Test positiv ausgefallen ist, können wie uns wieder von unserem Datenbankserver abmelden. +Reiter **Server**:
-   MariaDB [(none)]> quit+
  
-   Bye+{{ :centos:web_c7:pma_12.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}
  
 +Reiter **Datenbanken**:
  
-FIXME //do geds weida ...// FIXME+{{ :centos:web_c7:pma_13.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}
  
 +Reiter **Tabellen**:
  
 +{{ :centos:web_c7:pma_14.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}
  
-<file php config.inc.php><?php+Wie auch schon beim Kapitel **Navigationspanel** übernehmen wir beim Kapitel **Hauptpanel** die Defaultwerte. 
 + 
 +{{ :centos:web_c7:pma_15.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Setup}} 
 + 
 +Zum Speichern der Konfigurationswerte klicken wir im Konfigurationskapitel **Übersicht** auf die schaltfläche **[ Speichern ]** am unteren linke ende des Fensters. 
 + 
 +{{ :centos:web_c7:pma_17.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Setup}} 
 + 
 +Wollen wir die Konfigurationsdatei gesondert sichern, klicken wir auf die Schaltfläche **[ Download ]**. Bei Bedarf können wir uns die erstellte und gespeicherte Konfigurationsdaten auch anzeigen lassen; hierzu klicken wir auf die Schaltfläche **[ Anzeigen ]**. 
 + 
 +{{ :centos:web_c7:pma_18.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Setup}} 
 + 
 +Die mit der Web-GUI erstellte Konfigurationsdatei finden wir im Verzeichnis //**/var/lib/phpMyAdmin/config/**//
 +   # less /var/lib/phpMyAdmin/config/config.inc.php 
 +<file php /var/lib/phpMyAdmin/config/config.inc.php><?php
 /* /*
  * Generated configuration file  * Generated configuration file
  * Generated by: phpMyAdmin 4.3.6 setup script  * Generated by: phpMyAdmin 4.3.6 setup script
- * Date: Thu, 29 Jan 2015 15:51:43 +0100+ * Date: Thu, 29 Jan 2015 15:50:25 +0100
  */  */
  
Zeile 1904: Zeile 2315:
 /* End of servers configuration */ /* End of servers configuration */
  
-$cfg['blowfish_secret'] = '54ac43fea9b587.19721214';+$cfg['blowfish_secret'] = '54ca09fae9b875.19509b16';
 $cfg['UploadDir'] = ''; $cfg['UploadDir'] = '';
 $cfg['SaveDir'] = ''; $cfg['SaveDir'] = '';
Zeile 1910: Zeile 2321:
 $cfg['DefaultLang'] = 'de'; $cfg['DefaultLang'] = 'de';
 $cfg['ServerDefault'] = 1; $cfg['ServerDefault'] = 1;
 +$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload';
 +$cfg['SaveDir'] = '/var/lib/phpMyAdmin/save';
 +$cfg['RecodingEngine'] = 'auto';
 ?> ?>
 </file> </file>
  
  
 +==== abschließende Konfiguration ====
  
-===== abschließende Konfiguration ===== +Die erstelle Konfigurationsdatei verschieben wir nun in das Konfigurationsverzeichnis //**/etc/phpMyAdmin**// von phpMyAdmin.
- +
-Diese Datei verschieben wir nun in das Konfigurationsverzeichnis //**/etc/phpMyAdmin**// von phpMyAdmin.+
    # mv /var/lib/phpMyAdmin/config/config.inc.php /etc/phpMyAdmin -f    # mv /var/lib/phpMyAdmin/config/config.inc.php /etc/phpMyAdmin -f
  
Zeile 1926: Zeile 2339:
    # rmdir /usr/share/phpMyAdmin/setup/    # rmdir /usr/share/phpMyAdmin/setup/
  
-Nun können wir die Applikation **phpMyAdmin** mit dem Browser unserer Wahl starten+Für die **Import / Export** Funktion benötigen wir noch die RPM-Pakete **recode** und **php-recode**; diese installieren wir nun unter zuhilfenahme von **yum**. 
-   $ firefox http://phpmyadmin.nausch.org/setup/+   # yum install recode php-recode -y
  
-{{ :centos:web_c7:pma_018.png?direct&525 |BildBildschirmhardcopy phpMyAdmin Login Seite}} +Haben wir eine mySQL-Datenbank, wie sie z.B. unter CentOS 6 noch verwendet wurde, kann es beim Aufruf der Webseite http://phpmyadmin.nausch.org zu folgender Fehlermeldung kommen.
- +
-Nach erfolgter Anmeldung befinden wir uns im Hauptadministrationsfenster von **phpMyAdmin**.+
  
-{{ :centos:web_c7:pma_020.png?direct&666 |Bild: Bildschirmhardcopy phpMyAdmin Seite}}+{{ :centos:web_c7:pma_20.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Setup}}
  
 <WRAP center round tip 80%> <WRAP center round tip 80%>
 **Hinweis:** **Hinweis:**
- 
 Fehlermeldung **phpMyAdmin - Fehler** Fehlermeldung **phpMyAdmin - Fehler**
 //Sie sollten auf MySQL 5.5.0 oder neuer aktualisieren.// //Sie sollten auf MySQL 5.5.0 oder neuer aktualisieren.//
  
 +Damit wir unsere alte Datenbank mit **phpMyAdmin** administrieren können, ändern wir wie nachfolgend aufgezeigt, die Datei **common.inc.php**.
  
    # vim /usr/share/phpMyAdmin/libraries/common.inc.php    # vim /usr/share/phpMyAdmin/libraries/common.inc.php
Zeile 1955: Zeile 2366:
 </WRAP> </WRAP>
  
-   # yum install php-recode +===== Programmstart/-aufruf ===== 
- +Nun können wir die Applikation **phpMyAdmin** mit dem Browser unserer Wahl starten. 
 +   $ firefox http://phpmyadmin.nausch.org/setup/
  
 +{{ :centos:web_c7:pma_19.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Login Seite}}
  
 +Nach erfolgter Anmeldung befinden wir uns im Hauptadministrationsfenster von **phpMyAdmin**.
  
 +{{ :centos:web_c7:pma_020.png?direct&725 |Bild: Bildschirmhardcopy phpMyAdmin Seite}}
  
 +====== Links ======
 +  * **[[centos:web_c7:start| ⇐ Zurück zu Kapitel "Webserverinstallation unter CentOS 7.x"]]**
 +  * **[[wiki:start|Zurück zu Projekte und Themenkapitel]]**
 +  * **[[http://dokuwiki.nausch.org/doku.php/|Zurück zur Startseite]]**
  
  
  • centos/web_c7/phpmyadmin.1422554710.txt.gz
  • Zuletzt geändert: 29.01.2015 18:05.
  • von django