Main Menu

search

You are here

phpMyAdmin

[last updated: 2021-04-27]
PHP
Drupal home page
Drupal local server installation
-----

  • phpMyAdmin allows interacting with mySQL databases.
  • Installed on Dell tower with Software manager version: 4:4.6.6-5
  • Installed on Dell 4600 2021-04-27with Software manager version: 4:4.9.5-dfsg1-2
    • selected apache2 as
      "web server to reconfigure automatically."
      Did NOT select "lighttpd"
    • kept default selection "configure database for phpmyadmin with dbconfig-common."
  • You should be able to access it by entering: localhost/phpmyadmin in your browser URL
    • If you cannot, then make a symbolic link (which should have been done automatically when it was installed...) to the installation in your server root (perhaps /var/www/html):
      $ sudo ln -s /usr/share/phpmyadmin/ /var/www/html/phpmyadmin
    • After that, you'll be able to access through your browser
    • OR: if you neglected to click the apache2 checkbox during install, you may need to reconfigure the package:
      $ sudo dpkg-reconfigure phpmyadmin
  • On my Dell tower, I could access the phpmyadmin login page through a browser with URL:
        localhost/phpmyadmin
        OR: 127.0.0.1/phpmyadmin
    However, I could not log in, not knowing the username and password it wanted.
    • phpMyAdmin login page had a drop-down to select "host", with "localhost" and localhost:3306" options. I tried both with no success, but further research suggested I should use localhost
    • One forum said it wanted my mysql login, but not sure what that was either, though root & linux password didn't work...
    • One forum site said to edit /etc/phpmyadmin/config.inc.php and make the line with AllowNoPassword = TRUE
      (there were two such lines in my config file) However this didn't work either

    • Here's what finally worked:
      • In terminal (because FM doesn't have sufficient privilege):
        $ cd /etc/dbconfig-common
        $ sudo cat phpmyadmin.conf
      • find line: dbc_dbuser='phpmyadmin'
        below that, find: dbc_dbpass='6jfkvLu4tanj'
        the text between the ' ' is the password.
      • Back to localhost/phpmyadmin in your browser, enter:
        username: phpmyadmin
        password: [from conf file]
        and finally I was in.

      -----------------------------

    • Change Password in browser:
      • When you successfully log into localhost/phpmyadmin,
        in General Settings, click Change Password
      • With password check-box clicked, enter your desired password ('tripT'), then enter it again in "Re-type"
      • Click "Go" at the bottom - do NOT click "Generate"
      • Your new password should be active.
      • However: changing the password this way did NOT affect the password listed in /etc/dbconfig-common/phpmyadmin/conf, even though that password no longer worked, but executing reconfigure (see below) did in fact change the conf file to reflect the new password.
      • But Further:
        I did successfully log into mysql with:
        $ sudo mysql -u phpmyadmin -p
        then entering the password I just defined...
      • Later:
        I created (using grant - see mysql page) a new user (JC) for mysql drupal db, with pw=erjk, and indeed I can log into phpmyadmin with those credentials.
      • Even Later:
        repeated create new user for drupal, this time user=JCR, pw=asdf...

      ---------------------------

    • Change Password in terminal:
      • [have not tried this...]
        $ cd /etc/dbconfig-common
        $ sudo nano phpmyadmin.conf
        find line: dbc_dbuser='phpmyadmin'
        below that, find: dbc_dbpass='6jfkvLu4tanj'
        the text between the ' ' is the password.
        Change this to desired password.
        Then to activate the change you must execute:
              $ sudo dpkg-reconfigure phpmyadmin
      • I did not edit the conf file, however I did execute the reconfigure.
        It asked for lots of things which I just took my best shot at:
          ...configure to use a mysql server through a local unix socket (vs. TCP/IP)
          mysql database name for phpmyadmin: phpmyadmin
          mysql username for phpmyadmin: phpmyadmin@localhost
          password for phpmyadmin to register with database server: tripT
          name of account for administrative actions: debian-sys-maint (default)
          web server: apache2

        however in the end it made no difference:
        I could still log into phpmyadmin with that username, and I still could NOT log in with user root.
        Except for one change: the password listed in phpmyadmin.conf now was the new password I created in the browser.

      --------------------------------

    • Other notes:
      • Misc notes:
      • Tip: must define a primary key on your tables before the "Edit Copy Delete" options will show up.

    .

    .

    .

    eof