phpMyAdmin n'apparaît pas sur LocalHost !

Bonjour à la communauté Debian,

Cette semaine j’ai réussi à installer grâce à l’aide de membres du forum mon serveur local. :006
Aujourd’hui, j’ai MySQL d’installer et également phpMyAdmin. :116

Le soucis est qu’on dit sur tous les tutos que j’ai lu que une fois installer, pour se connecter à phpMyAdmin il faut aller sur :
localhost/phpmyadmin/

:geek: Le soucis est que j’ai juste mon site dans :

/var/www/

Donc je ne trouve nullepart mon phpMyAdmin. :doh:
Comment donc, me connecter à l’interface via IceWeasel ? :shifty:

Merci d’avance. :023

Goldo974

Salut,
Si tu as installé “façon Debian” il devrait y avoir un fichier dans /etc/apache2/conf.d/phpmyadmin (c’est un lien symbolique qui pointe vers /etc/phpmyadmin/apache.conf)

Regarde ce qu’il contient:

Salut lol et merci à toi de l’intérêt que tu portes à ma requête.

Je n’ai pas de fichier phpmyadmin:

#cd /etc/apache2/conf.d/
#ls
apache2-doc  charset  localized-error-pages  other-vhosts-access-log  security 

En revanche le fichier /etc/phpmyadmin/apache.conf contient :

# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin

<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/phpmya$
        </IfModule>
</Directory>

# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
    <IfModule mod_authn_file.c>
    AuthType Basic
    AuthName "phpMyAdmin Setup"
    AuthUserFile /etc/phpmyadmin/htpasswd.setup
    </IfModule>
    Require valid-user
</Directory>

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

De deux choses, l’une :

  • soit tu link /etc/apache2/conf.d/phpmyadmin vers /etc/phpmyadmin/apache.conf…
  • soit tu copies le fichier /etc/phpmyadmin/apache.conf et créé le fichier /etc/apache2/conf.d/phpmyadmin et colles dedans les infos du premier …

La première étant la plus simple.

Puis tu redémarres ton serveur web !
Pour finir, tu pointes ton navigateur web, vers localhost/phpmyadmin/

Salut PengouinPdt,

Super j’ai fait comme tu as dit et j’ai un retour… et des erreurs :

http://localhost/phpmyadmin/

Erreur

MySQL a répondu: Documentation
Connexion impossible: paramètres incorrects. 
phpMyAdmin a tenté de se connecter au serveur MySQL, et le serveur a rejeté la connexion. Veuillez vérifier les valeurs de host, username et password dans votre configuration et vous assurer qu'elles correspondent aux informations fournies par l'administrateur du serveur MySQL.

Re,

Ou édition de /etc/phpmyadmin/config-db.php pour changer les paramètres de connexion à mysql.

Bonsoir lol,

J’ai fait comme t’as dit mais çà n’a rien changer. Voici le contenu de mon fichier /etc/phpmyadmin/config-db.php :

<?php
##
## database access settings in php format
## automatically generated from /etc/dbconfig-common/phpmyadmin.conf
## by /usr/sbin/dbconfig-generate-include
## Sun, 24 Feb 2013 19:05:05 +0400
##
## by default this file is managed via ucf, so you shouldn't have to
## worry about manual changes being silently discarded.  *however*,
## you'll probably also want to edit the configuration file mentioned
## above too.
##
$dbuser='phpmyadmin';
$dbpass='mysql';
$basepath='';
$dbname='phpmyadmin';
$dbserver='';
$dbport='';
$dbtype='mysql';

Salut,
Tu as un problème de mot de passe…
Si tu connais ton mot de passe pour l’utilisateur phpmyadmin tu devrais pouvoir te connecter à mysql comme ceci:

à lol
Alors j’ai fait comme t’as dit mais çà ne fonctionne toujours pas…

# mysql -uphpmyadmin -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 54
Server version: 5.5.28-1 (Debian)

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

Dans IceWeasel voici le retour :

Erreur

MySQL a répondu: Documentation
Connexion impossible: paramètres incorrects.
phpMyAdmin a tenté de se connecter au serveur MySQL, et le serveur a rejeté la connexion. Veuillez vérifier les valeurs de host, username et password dans votre configuration et vous assurer qu'elles correspondent aux informations fournies par l'administrateur du serveur MySQL.

Salut,
Y’a un truc…

Tu peux te reconnecter à mysql (identifiant et mot de passe de phpmyadmin) et donner le retour de show databases;

Tu es bien sur que le mot de passe et l’utilisateur dans le fichier /etc/phpmyadmin/config-db.php sont bons ?

mysql écoute sur le port classique ? # netstat -laputen | grep mysql

As-tu tenté 127.0.0.1/phpmyadmin dans ton navigateur ?

Il y a quoi dans ton fichiers /etc/hosts ?

Salut lol,

1) Comment je fais pour me connecter à MySQL ?

2) Dans quoi dois-je entrer la commande : show databases;?

3) Mon mot de passe à toujours été le même pour ce qui est du serveur local : “mysql

4) Retour de etc/phpmyadmin/config-db.php

<?php
##
## database access settings in php format
## automatically generated from /etc/dbconfig-common/phpmyadmin.conf
## by /usr/sbin/dbconfig-generate-include
## Mon, 25 Feb 2013 09:14:37 +0400
##
## by default this file is managed via ucf, so you shouldn't have to
## worry about manual changes being silently discarded.  *however*,
## you'll probably also want to edit the configuration file mentioned
## above too.
##
$dbuser='phpmyadmin';
$dbpass='mysql';
$basepath='';
$dbname='phpmyadmin';
$dbserver='';
$dbport='';
$dbtype='mysql';

5) Que veux-tu dire par :

6) Je n’ai aucun retour de :

# netstat -laputen | grep mysql

7) En me connectant à localhost/phpmyadmin/ voici ce qui s’affiche (sur fond rose):

Bienvenue dans phpMyAdmin

Erreur

MySQL a répondu: Documentation
Connexion impossible: paramètres incorrects.
phpMyAdmin a tenté de se connecter au serveur MySQL, et le serveur a rejeté la connexion. Veuillez vérifier les valeurs de host, username et password dans votre configuration et vous assurer qu'elles correspondent aux informations fournies par l'administrateur du serveur MySQL.

8) Retour du fichier /etc/hosts

127.0.0.1       localhost
127.0.1.1       pc-wheezy.localhost     pc-wheezy

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Voilà, je suis vraiment navré de la gêne occasionnée par mon manque de connaissances.
En tout cas, merci infiniment pour ton aide.

Goldo974

Salut,
Pas de soucis, c’est normal.

[quote=“Goldo974”]1) Comment je fais pour me connecter à MySQL ?[/quote]mysql -uphpmyadmin -p

[quote=“Goldo974”]2) Dans quoi dois-je entrer la commande : show databases;?[/quote][code]# mysql -uphpmyadmin -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5307
Server version: 5.5.29-0ubuntu0.12.10.1 (Ubuntu)

Copyright © 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> show databases;
±-------------------+
| Database |
±-------------------+
| information_schema |
| phpmyadmin |
| test |
±-------------------+
3 rows in set (0.00 sec)

mysql> exit
Bye[/code]

[quote=“Goldo974”]7) En me connectant à localhost/phpmyadmin/ voici ce qui s’affiche (sur fond rose):[/quote]Et avec 127.0.0.1 à la place de localhost ?

[quote=“Goldo974”]6) Je n’ai aucun retour de :[/quote]Ça c’est un peu bizarre. Tu es bien root ?

Quel est le retour de # service mysql restart

Resalut lol,
Désolé si par moment je traine à donner les retours mais je prépare un concours.
Du coup je check les posts pendants mes pauses…

Alors pour la connexion à MySQL :

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| phpmyadmin         |
| test               |
+--------------------+
3 rows in set (0.00 sec)

Pour 127.0.0.1 à la place de localhost : çà ne change absolument rien !

Alors je suis bien en root # et voici le retour demandé :

# service mysql restart
[ ok ] Stopping MySQL database server: mysqld.
[ ok ] Starting MySQL database server: mysqld ..
[info] Checking for tables which need an upgrade, are corrupt or were 
not closed cleanly..

Re,
Je ne comprend pas…

Est-ce que les valeurs de dbuser et dbpass sont identiques dans /etc/dbconfig-common/phpmyadmin.conf et dans /etc/phpmyadmin/config-db.php

Que retourne:

On dirait que les dbuser et dbpass sont les mêmes…

phpmyadmin.conf

# dbc_dbuser: database user
#       the name of the user who we will use to connect to the database.
dbc_dbuser='phpmyadmin'

# dbc_dbpass: database user password
#       the password to use with the above username when connecting
#       to a database, if one is required
dbc_dbpass='mysql'

config-db.php

$dbuser='phpmyadmin';
$dbpass='mysql';

Et voilà pour le retour de # netstat -laputen | grep LISTEN

# netstat -laputen | grep LISTEN
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN      0          7896        4146/dovecot    
tcp        0      0 0.0.0.0:46820           0.0.0.0:*               LISTEN      106        6436        1796/rpc.statd  
tcp        0      0 0.0.0.0:901             0.0.0.0:*               LISTEN      0          7540        2347/inetd      
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      120        63675       25750/mysqld    
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      0          10633       4084/smbd       
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      0          7894        4146/dovecot    
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      0          7910        4146/dovecot    
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      0          6412        1764/rpcbind    
tcp        0      0 192.168.1.71:53         0.0.0.0:*               LISTEN      108        24728       2349/named      
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      108        6624        2349/named      
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          50757       21462/sshd      
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      0          31955       3936/cupsd      
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      115        6750        2805/postgres   
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      0          8759        3947/exim4      
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      108        6627        2349/named      
tcp        0      0 0.0.0.0:17500           0.0.0.0:*               LISTEN      1000       14434       4616/dropbox    
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      0          10631       4084/smbd       
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      0          7912        4146/dovecot    
tcp6       0      0 :::995                  :::*                    LISTEN      0          7897        4146/dovecot    
tcp6       0      0 :::139                  :::*                    LISTEN      0          10629       4084/smbd       
tcp6       0      0 :::110                  :::*                    LISTEN      0          7895        4146/dovecot    
tcp6       0      0 :::143                  :::*                    LISTEN      0          7911        4146/dovecot    
tcp6       0      0 :::111                  :::*                    LISTEN      0          6419        1764/rpcbind    
tcp6       0      0 :::80                   :::*                    LISTEN      0          6962        3367/apache2    
tcp6       0      0 :::53                   :::*                    LISTEN      108        6619        2349/named      
tcp6       0      0 :::22                   :::*                    LISTEN      0          50759       21462/sshd      
tcp6       0      0 ::1:631                 :::*                    LISTEN      0          31954       3936/cupsd      
tcp6       0      0 ::1:5432                :::*                    LISTEN      115        6749        2805/postgres   
tcp6       0      0 ::1:25                  :::*                    LISTEN      0          8760        3947/exim4      
tcp6       0      0 ::1:953                 :::*                    LISTEN      108        6628        2349/named      
tcp6       0      0 :::445                  :::*                    LISTEN      0          10627       4084/smbd       
tcp6       0      0 :::56511                :::*                    LISTEN      106        6442        1796/rpc.statd  
tcp6       0      0 :::993                  :::*                    LISTEN      0          7913        4146/dovecot    

Bon… :017

Quels sont les privilèges de l’utilisateur phpmyadmin ?
Connecte toi à mysql avec l’identifiant root et lance cette commande: SHOW GRANTS FOR ‘postfixadmin’@‘localhost’;

[code]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2870
Server version: 5.5.29-0ubuntu0.12.10.1 (Ubuntu)

Copyright © 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> SHOW GRANTS FOR ‘phpmyadmin’@‘localhost’;
±------------------------------------------------------------------------------------------------------------------+
| Grants for phpmyadmin@localhost |
±------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON . TO ‘phpmyadmin’@‘localhost’ IDENTIFIED BY PASSWORD 'D6890A3C31BCA2FAC1F3DF81C6C4460909B960D5’ |
| GRANT ALL PRIVILEGES ON phpmyadmin.
TO ‘phpmyadmin’@‘localhost’ |
±------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

mysql> exit
Bye[/code]

Voili voilou…

# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 47
Server version: 5.5.28-1 (Debian)

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW GRANTS FOR 'phpmyadmin'@'localhost';
+-------------------------------------------------------------------------------------------------------------------+
| Grants for phpmyadmin@localhost                                                                                   |
+-------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'phpmyadmin'@'localhost' IDENTIFIED BY PASSWORD '*E74858DB86EBA20BC33D0AECAE8A8108C56B17FA' |
| GRANT ALL PRIVILEGES ON `phpmyadmin`.* TO 'phpmyadmin'@'localhost'                                                |
+-------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

mysql> 

Salut,
Je n’aime pas donner ce genre de conseil, mais là…

apt-get remove --purge phpmyadmin apt-get install phpmyadmin

Aux grands maux les grands remèdes…! :005

TOUT SIMPLEMENT GENIAL !!!
MILLE MERCI lol :023 :041 :030 :006

Voilà comme quoi… Je sais pas ce qui s’est passé la première fois lors de mon installation…?
Mystère…!

Enfin maintenant çà fonctionne. Je te remercie grandement.

Bravo à toi lol

Goldo974