Mainos / Advertisement:

Ero sivun ”Phpmyadmin/en” versioiden välillä

Kohteesta Taisto
Siirry navigaatioon Siirry hakuun
(Ak: Uusi sivu: == Configuration ==)
(Ak: Uusi sivu: https://www.omaserveri.info/asenna-phpmyadmin-ubuntuun/ (Finnish))
 
(15 välissä olevaa versiota samalta käyttäjältä ei näytetä)
Rivi 37: Rivi 37:
 
== Configuration ==
 
== Configuration ==
  
Oletuksena kaikki konfiguroinnit on valmiina tehty valmiiksi asennusvaiheessa.
+
By default all configurations are made ready to function in the installation phase.
  
Phpmyadminin apache2 konfigurointi tiedostot sijaitsevat:
+
Phpmyadmin's apache2 configuration files are located in:
  
 
   nano /etc/apache2/conf.d/phpmyadmin.conf
 
   nano /etc/apache2/conf.d/phpmyadmin.conf
  
JA (molemmmissa on sama tiedosto)
+
AND (both have the same file)
  
 
   nano /etc/phpmyadmin/apache.conf  
 
   nano /etc/phpmyadmin/apache.conf  
  
Tiedoston sisältö:  
+
Contents of the file:  
  
 
   # phpMyAdmin default Apache configuration
 
   # phpMyAdmin default Apache configuration
Rivi 53: Rivi 53:
 
   Alias /phpmyadmin /usr/share/phpmyadmin
 
   Alias /phpmyadmin /usr/share/phpmyadmin
  
Alias on virtuaalihakemisto missä phpmyadmin sijaitsee. Suositeltavaa on muuttaa virtuaalihakemiston sijaintia muualle, näin ollen tuntemattomalla henkilöllä on vaikeampi päästä phpmyadmin sivulle.
+
Alias is a virtual directory where phpmyadmin is located. It is recommended to change the location of the virtual directory to somewhere else, so an attacker who isn't familiar with your configuration will have a harder time to access the phpmyadmin page.
 
    
 
    
 
   #<Directory /usr/share/phpmyadmin>
 
   #<Directory /usr/share/phpmyadmin>
Rivi 74: Rivi 74:
 
   #
 
   #
  
Kirjautuminen phpmyadminin asetussivulle.
+
Logging in to the phpmyadmin settings page.
  
 
   # Authorize for setup
 
   # Authorize for setup
Asetussivun fyysinen polku:
+
Settings page physical path:
 
   <Directory /usr/share/phpmyadmin/setup>
 
   <Directory /usr/share/phpmyadmin/setup>
 
     <IfModule mod_authn_file.c>
 
     <IfModule mod_authn_file.c>
 
     AuthType Basic
 
     AuthType Basic
 
     AuthName "phpMyAdmin Setup"
 
     AuthName "phpMyAdmin Setup"
Salasana tiedoston sijainti:
+
Password file location:
 
     AuthUserFile /etc/phpmyadmin/htpasswd.setup
 
     AuthUserFile /etc/phpmyadmin/htpasswd.setup
 
     </IfModule>
 
     </IfModule>
Rivi 88: Rivi 88:
 
   </Directory>
 
   </Directory>
  
Estä pääsemästä phpmyadminin järjestelmähakemistoihin kun ei tarvita niitä
+
Block access to the phpmyadmin system directories when they are not required.
  
 
   # Disallow web access to directories that don't need it
 
   # Disallow web access to directories that don't need it
Rivi 100: Rivi 100:
 
   </Directory>
 
   </Directory>
  
== Useita MySQL palvelimia Phpmyadminiin ==
+
== Several MySQL servers for Phpmyadmin ==
  
Lisää seuraavat konffit /etc/phpmyadmin/config.inc.php tiedostoon seuraavan konffien jälkeen:
+
Add the following configurations to the /etc/phpmyadmin/config.inc.php after the next configurations:
  
 
  /*
 
  /*
Rivi 109: Rivi 109:
 
  */
 
  */
  
Tämä:
+
This:
  
 
   $i++;
 
   $i++;
 
   
 
   
  $cfg['Servers'][$i]['verbose'] = 'Database Server 2'; #Tietokantapalvelimen nimi, jolla tunnistetaan kirjautuessa
+
  $cfg['Servers'][$i]['verbose'] = 'Database Server 2'; #Database server name, which is used for authentication
 
   
 
   
 
  /* Authentication type */
 
  /* Authentication type */
 
  $cfg['Servers'][$i]['auth_type'] = 'cookie';
 
  $cfg['Servers'][$i]['auth_type'] = 'cookie';
 
  /* Server parameters */
 
  /* Server parameters */
  $cfg['Servers'][$i]['host'] = '10.5.2.5'; #palvelimen IP-osoite, voi käyttää DNS-nimeä mutta saattaa olla hidas
+
  $cfg['Servers'][$i]['host'] = '10.5.2.5'; #server IP-address, you can use a DNS name but it might be slow
 
  $cfg['Servers'][$i]['connect_type'] = 'tcp';
 
  $cfg['Servers'][$i]['connect_type'] = 'tcp';
 
  //$cfg['Servers'][$i]['compress'] = false;
 
  //$cfg['Servers'][$i]['compress'] = false;
Rivi 124: Rivi 124:
 
  $cfg['Servers'][$i]['extension'] = 'mysql';
 
  $cfg['Servers'][$i]['extension'] = 'mysql';
 
  /* Optional: User for advanced features */
 
  /* Optional: User for advanced features */
  $cfg['Servers'][$i]['controluser'] = $dbuser; #phpmyadminin tietokannan käyttäjätunnus
+
  $cfg['Servers'][$i]['controluser'] = $dbuser; #phpmyadmin database username
  $cfg['Servers'][$i]['controlpass'] = $dbpass; #phpmyadminin tietokannan salasana
+
  $cfg['Servers'][$i]['controlpass'] = $dbpass; #phpmyadmin database password
 
  /* Optional: Advanced phpMyAdmin features */
 
  /* Optional: Advanced phpMyAdmin features */
  $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; #phpmyadminin tietokannan nimi
+
  $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; #phpmyadmin database name
 
  $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
 
  $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
 
  $cfg['Servers'][$i]['relation'] = 'pma_relation';
 
  $cfg['Servers'][$i]['relation'] = 'pma_relation';
Rivi 145: Rivi 145:
 
  */
 
  */
  
Testaa toiminta menemällä selaimella phpmyadminiin. Pitäisi näkyä nyt palvelimet listattuna.
+
Test functionality by using your web browser to navigate to phpmyadmin. Now you should see the servers listed.
  
 
[[Tiedosto:Phpmyadmin multiple server login.png]]
 
[[Tiedosto:Phpmyadmin multiple server login.png]]
  
== Lisätietoa ==
+
== Additional information ==
  
https://www.omaserveri.info/asenna-phpmyadmin-ubuntuun/
+
https://www.omaserveri.info/asenna-phpmyadmin-ubuntuun/ (Finnish)
  
 
[[Category:Mysql]]
 
[[Category:Mysql]]
 
[[Category:Linux]]
 
[[Category:Linux]]
 
[[Category:Apache2]]
 
[[Category:Apache2]]

Nykyinen versio 17. elokuuta 2015 kello 07.45

Muut kielet:
English • ‎suomi

Phpmyadmin is a useful application for the administrator of a mysql database. Before installing phpmyadmin, install php5,mysql and apache2. More information on phpmyadmin.

Installation

1. We install phpmyadmin using the command line or by downloading the package online http://www.phpmyadmin.net/

aptitude install phpmyadmin

2. While installing we select the automatic configuration for an apache2 webserver.

Phpmyadmin 1.png

3. We install an automatic database for phpmyadmin.

Phpmyadmin 2.png

4. Give the Mysql ROOT user password.

Phpmyadmin 3.png

5. Give the phpmyadmin user password. You can leave it blank, and a password will be generated.

Phpmyadmin 4.png

6. Confirm password

Phpmyadmin 5.png


You can access the web GUI and use it to administrate your database by:

http://serveraddress/phpmyadmin

Phpmyadmin 6.png

Configuration

By default all configurations are made ready to function in the installation phase.

Phpmyadmin's apache2 configuration files are located in:

 nano /etc/apache2/conf.d/phpmyadmin.conf

AND (both have the same file)

 nano /etc/phpmyadmin/apache.conf 

Contents of the file:

 # phpMyAdmin default Apache configuration
 
 Alias /phpmyadmin /usr/share/phpmyadmin

Alias is a virtual directory where phpmyadmin is located. It is recommended to change the location of the virtual directory to somewhere else, so an attacker who isn't familiar with your configuration will have a harder time to access the phpmyadmin page.

 #<Directory /usr/share/phpmyadmin>
 #       Options FollowSymLinks
 #       DirectoryIndex index.php
 #
 #       <IfModule mod_php5.c>
 #               AddType application/x-httpd-php .php
 #
 #               php_flag magic_quotes_gpc Off
 #               php_flag track_vars On
 #               php_flag register_globals Off
 #               php_admin_flag allow_url_fopen Off
 #               php_value include_path .
 #               php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
 #               php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/
 #       </IfModule>
 #
 #</Directory>
 #

Logging in to the phpmyadmin settings page.

 # Authorize for setup

Settings page physical path:

  <Directory /usr/share/phpmyadmin/setup>
   <IfModule mod_authn_file.c>
   AuthType Basic
   AuthName "phpMyAdmin Setup"

Password file location:

   AuthUserFile /etc/phpmyadmin/htpasswd.setup
   </IfModule>
   Require valid-user
 </Directory>

Block access to the phpmyadmin system directories when they are not required.

 # Disallow web access to directories that don't need it
  <Directory /usr/share/phpmyadmin/libraries>
   Order Deny,Allow
   Deny from All
   </Directory>
  <Directory /usr/share/phpmyadmin/setup/lib>
   Order Deny,Allow
   Deny from All
 </Directory>

Several MySQL servers for Phpmyadmin

Add the following configurations to the /etc/phpmyadmin/config.inc.php after the next configurations:

/*
* End of servers configuration
*
*/

This:

 $i++;

$cfg['Servers'][$i]['verbose'] = 'Database Server 2'; #Database server name, which is used for authentication

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '10.5.2.5'; #server IP-address, you can use a DNS name but it might be slow
$cfg['Servers'][$i]['connect_type'] = 'tcp';
//$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
/* Optional: User for advanced features */
$cfg['Servers'][$i]['controluser'] = $dbuser; #phpmyadmin database username
$cfg['Servers'][$i]['controlpass'] = $dbpass; #phpmyadmin database password
/* Optional: Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; #phpmyadmin database name
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
/* Uncomment the following to enable logging in to passwordless accounts,
* after taking note of the associated security risks. */
// $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
/*
* End of servers configuration
*/

Test functionality by using your web browser to navigate to phpmyadmin. Now you should see the servers listed.

Phpmyadmin multiple server login.png

Additional information

https://www.omaserveri.info/asenna-phpmyadmin-ubuntuun/ (Finnish)

Mainos / Advertisement: