phpmyadmin + nginx + mirror cluster ---> mess...

Discussion in 'Installation/Configuration' started by alexolivan, Oct 30, 2014.

  1. alexolivan

    alexolivan Member

    Hi forum.

    I have setup an ISpconfig mirrored setup that, well..., rocks!
    I'm not an expert with ispconfig, but by reading the different howtos I managed to create a 4 node mirrored cluster setup

    The "unsupported" part is that it uses mariadb-galera 5.5 for database replication.
    storage mirroring is done via glusterfs.
    Overall it all works with wheezy/nginx perfect server setup....

    but phpmyadmin... that works PARTIALLY
    - it allows only root user login
    - it warns about cookie usage

    apart of this CRITICAL problems, there are some forum common minor problems regardind nginx alias to /phpmyadmin not working and ...8080/phpmyadmin icon click not working
    I have work arounded this by NOT using nginx per-site alias, and using server interface phpmyadmin settings to specify url.

    ...Apart of this, apps vhost ports works on 8082 instead of 8081, with no problem.

    During install, in fact, while installing phpmyadmin on 2nd, 3rd and so servers phpmyadmin reported database entries already existing and the package refused to cleanly install (no problem found on 1st server install).
    In order to workaround this I had to select to NOT CONFIGURE the package with db config-common on install
    then, distributing db-config.php from firtst server to the rest of servers made phpmyadmin work.

    Now, I can use phpmyadmin on ALL servers by using the nginx app vhost on 8082... but:
    - I can log in only as root.
    When trying to log as a db user I got a #1045 Cannot log in to the MySQL server
    - Also, on servers 2n, 3rd and 4th a warning about cookies appears...although root login works.

    The fact that root login works means to me that everything is almost correct, ant there must be something weird somewhere that denies perfection!

    Thank you very much in advance!
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Do the mysql users of the client databases exist on the other mariadb nodes?

    Regarding phpmyadmin icon: enter the full URL starting with http:// in the phpmyadmin url field in ispconfig.
  3. alexolivan

    alexolivan Member

    Thank you for your reply!

    Well... I do not know which database / table / should I check and compare between nodes to get that info... I'm sorry I do not know much about ISpconfig internals...

    I see I got four dbispconfigX (where X is 0,1,2,3) databases as stated in the cluster howto, and good new I got my test db present on every nodes, so replication/mirroring seems to be working very well...

    I will look around to see if I found users table...

    BEst regards
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats not ispconfig specific, mysql users are in the database named "mysql" and there in the table with the name "user".
  5. alexolivan

    alexolivan Member


    performed SELECT user FROM mysql.user; on all nodes

    and YES! my user is there!... so replication worked... and the user is present every where...

  6. alexolivan

    alexolivan Member

    Checked this on all nodes...

    MariaDB [(none)]> SHOW GRANTS for c3_dbadmin;
    ERROR 1141 (42000): There is no such grant defined for user 'c3_dbadmin' on host '%'
    MariaDB [(none)]> SHOW GRANTS for 'c3_dbadmin'@'localhost';
    | Grants for [email protected] |
    | GRANT USAGE ON *.* TO 'c3_dbadmin'@'localhost' IDENTIFIED BY PASSWORD '*1A57549509816DCD929E50A8A7AD4800C0EF4237' |
    | GRANT ALL PRIVILEGES ON `c3_demodb`.* TO 'c3_dbadmin'@'localhost' |
    2 rows in set (0.00 sec)

    So permisions ware there
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    And phpmyadmin is using these users as it has no own user database. So its a bit strange why it cant connect then.
  8. alexolivan

    alexolivan Member

    .... I do not understand

    All of the sudden it works.

    The only thing I have done are:
    -recheck dbuser -> database asociation on the GUI... it was ok, but Iḿ not sure wheter I clicked Save or Cancel... sorry!
    -perform the described here mysql tests on the nodes

    I have to investigate wether it all works really... I'm not sure
    ....Maybe replication was like sleeping and I waked it up? :confused:

Share This Page