[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You should upgrade to MySQL 5.5.0 or later error #118

Closed
soullivaneuh opened this issue Apr 11, 2017 · 16 comments
Closed

You should upgrade to MySQL 5.5.0 or later error #118

soullivaneuh opened this issue Apr 11, 2017 · 16 comments
Assignees
Labels

Comments

@soullivaneuh
Copy link
Contributor
soullivaneuh commented Apr 11, 2017

Since the last pull, I have this error while trying to access PMA:

You should upgrade to MySQL 5.5.0 or later.

The problem is... I use it with MySQL... 5.6! \o/

Here is my docker-compose.yml file (concerned part):

version: '2'

services:
  mysql:
    image: mysql:5.6
    environment:
      - MYSQL_ALLOW_EMPTY_PASSWORD=yes

  pma:
    image: phpmyadmin/phpmyadmin
    depends_on:
      - mysql
    ports:
      - '8100:80'
    environment:
      - PMA_HOST=mysql
      - PMA_USER=root

Also tried with phpmyadmin/phpmyadmin:4.6, same thing.

Any idea of why?

@nijel
Copy link
Contributor
nijel commented Apr 11, 2017

What does the server return when you execute SELECT @@version, @@version_comment?

@soullivaneuh
Copy link
Contributor Author
$ docker-compose exec mysql bash
root@0976cf56d025:/# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.6.35 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, 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> SELECT @@version, @@version_comment;
+-----------+------------------------------+
| @@version | @@version_comment            |
+-----------+------------------------------+
| 5.6.35    | MySQL Community Server (GPL) |
+-----------+------------------------------+
1 row in set (0.00 sec)

@soullivaneuh
Copy link
Contributor Author
soullivaneuh commented Apr 11, 2017

I tried a simplified as possible standalone docker-compose.yml (updated the base post):

version: '2'

services:
  mysql:
    image: mysql:5.6
    environment:
      - MYSQL_ALLOW_EMPTY_PASSWORD=yes

  pma:
    image: phpmyadmin/phpmyadmin
    depends_on:
      - mysql
    ports:
      - '8100:80'
    environment:
      - PMA_HOST=mysql
      - PMA_USER=root

Here is the up log:

docker-compose up 
Recreating docker_mysql_1
Recreating docker_pma_1
Attaching to docker_mysql_1, docker_pma_1
mysql_1  | 2017-04-11 14:28:30 0 [Note] mysqld (mysqld 5.6.35) starting as process 1 ...
mysql_1  | 2017-04-11 14:28:30 1 [Note] Plugin 'FEDERATED' is disabled.
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: Using atomics to ref count buffer pool pages
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: The InnoDB memory heap is disabled
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: Memory barrier is not used
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: Compressed tables use zlib 1.2.8
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: Using Linux native AIO
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: Using CPU crc32 instructions
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: Initializing buffer pool, size = 128.0M
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: Completed initialization of buffer pool
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: Highest supported file format is Barracuda.
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: The log sequence numbers 1625997 and 1625997 in ibdata files do not match the log sequence number 1626007 in the ib_logfiles!
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: Database was not shutdown normally!
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: Starting crash recovery.
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: Reading tablespace information from the .ibd files...
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: Restoring possible half-written data pages 
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: from the doublewrite buffer...
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: 128 rollback segment(s) are active.
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: Waiting for purge to start
mysql_1  | 2017-04-11 14:28:30 1 [Note] InnoDB: 5.6.35 started; log sequence number 1626007
mysql_1  | 2017-04-11 14:28:30 1 [Note] Server hostname (bind-address): '*'; port: 3306
mysql_1  | 2017-04-11 14:28:30 1 [Note] IPv6 is available.
mysql_1  | 2017-04-11 14:28:30 1 [Note]   - '::' resolves to '::';
mysql_1  | 2017-04-11 14:28:30 1 [Note] Server socket created on IP: '::'.
mysql_1  | 2017-04-11 14:28:30 1 [Warning] 'proxies_priv' entry '@ root@c9630ac6a443' ignored in --skip-name-resolve mode.
mysql_1  | 2017-04-11 14:28:30 1 [Note] Event Scheduler: Loaded 0 events
mysql_1  | 2017-04-11 14:28:30 1 [Note] mysqld: ready for connections.
mysql_1  | Version: '5.6.35'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
pma_1    | 2017-04-11 14:28:30,846 CRIT Supervisor running as root (no user in config file)
pma_1    | 2017-04-11 14:28:30,846 WARN Included extra file "/etc/supervisor.d/nginx.ini" during parsing
pma_1    | 2017-04-11 14:28:30,846 WARN Included extra file "/etc/supervisor.d/php.ini" during parsing
pma_1    | 2017-04-11 14:28:30,856 INFO RPC interface 'supervisor' initialized
pma_1    | 2017-04-11 14:28:30,856 CRIT Server 'unix_http_server' running without any HTTP authentication checking
pma_1    | 2017-04-11 14:28:30,856 INFO supervisord started with pid 1
pma_1    | 2017-04-11 14:28:31,858 INFO spawned: 'php-fpm' with pid 22
pma_1    | 2017-04-11 14:28:31,859 INFO spawned: 'nginx' with pid 23
pma_1    | 2017-04-11 14:28:32,886 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
pma_1    | 2017-04-11 14:28:32,886 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

Still have the issue.

nijel added a commit to phpmyadmin/phpmyadmin that referenced this issue Apr 11, 2017
See phpmyadmin/docker#118

Signed-off-by: Michal Čihař <michal@cihar.com>
@nijel
Copy link
Contributor
nijel commented Apr 11, 2017

Hmm, that looks completely okay.

@nijel nijel added the bug label Apr 11, 2017
@soullivaneuh
Copy link
Contributor Author

I'll pull your commit ASAP and give you a feedback, thanks.

@nijel
Copy link
Contributor
nijel commented Apr 11, 2017

That commit won't fix anything, it's just added test for the code :-).

You can workaround it by setting $cfg['MysqlMinVersion']['internal'] = 0 in config file, see https://docs.phpmyadmin.net/en/latest/setup.html#customizing-configuration for information how to add it to Docker. Once you do that, can you please tell me what server version information does phpMyAdmin report on main page?

@soullivaneuh
Copy link
Contributor Author
soullivaneuh commented Apr 11, 2017

I tried with the following config files:

<?php

$cfg['MysqlMinVersion']['internal'] = 0;

Mounted like this:

  pma:
    image: phpmyadmin/phpmyadmin
    volumes:
      - ./docker/conf/phpmyadmin.user.inc.php:/etc/phpmyadmin/config.user.inc.php:ro
    depends_on:
      - mysql
    ports:
      - '8100:80'
    environment:
      - PMA_HOST=mysql
      - PMA_USER=root

And I have a lot of error, like those:

Missing connection parameters!
Notice in ./libraries/common.inc.php#778
 Use of undefined constant PMA_MYSQL_INT_VERSION - assumed 'PMA_MYSQL_INT_VERSION'

Backtrace

./index.php#19: require_once(./libraries/common.inc.php)
Warning in ./libraries/dbi/DBIMysqli.php#556
 mysqli_real_escape_string() expects parameter 1 to be mysqli, boolean given

Backtrace

./libraries/dbi/DBIMysqli.php#556: mysqli_real_escape_string(
boolean false,
string '_',
)
./libraries/DatabaseInterface.php#2731: PMA\libraries\dbi\DBIMysqli->escapeString(
boolean false,
string '_',
)
./libraries/navigation/nodes/Node.php#437: PMA\libraries\DatabaseInterface->escapeString(string '_')
./libraries/navigation/NavigationTree.php#288: PMA\libraries\navigation\nodes\Node->getData(
string 'databases',
integer 0,
string '',
)
./libraries/navigation/NavigationTree.php#847: PMA\libraries\navigation\NavigationTree->_buildPath()
./libraries/navigation/Navigation.php#45: PMA\libraries\navigation\NavigationTree->renderState()
./libraries/Header.php#433: PMA\libraries\navigation\Navigation->getDisplay()
./libraries/Response.php#260: PMA\libraries\Header->getDisplay()
./libraries/Response.php#273: PMA\libraries\Response->_getDisplay()
./libraries/Response.php#432: PMA\libraries\Response->_htmlResponse()
PMA\libraries\Response->response()

Did I f*cked up something? 😄

@soullivaneuh
Copy link
Contributor Author
soullivaneuh commented Apr 11, 2017

Seems to be because of the <?php tag.

Anyway, I tried:

$cfg['MysqlMinVersion']['internal'] = 0;
$cfg['MysqlMinVersion']['human'] = '0.0.0';

And this changes nothing, I still have the error...

Can't you reproduce it with the provided docker-compose.yml?

nijel added a commit to phpmyadmin/phpmyadmin that referenced this issue Apr 11, 2017
@nijel
Copy link
Contributor
nijel commented Apr 11, 2017

I can reproduce it now. The problem is that you have set PMA_USER but not PMA_PASSWORD, what triggers bug in configuration checking code leading to not reported connection failure. I've adjusted the Docker container to set password to empty string in such case and I've also fixed handling of this situation on the phpMyAdmin side.

To fix the error, just set PMA_PASSWORD= in your docker-compose.yml.

@nijel nijel closed this as completed in 1204bcd Apr 11, 2017
@soullivaneuh
Copy link
Contributor Author

Just tried with:

version: '2'

services:
  mysql:
    image: mysql:5.6
    environment:
      - MYSQL_ALLOW_EMPTY_PASSWORD=yes

  pma:
    image: phpmyadmin/phpmyadmin
    depends_on:
      - mysql
    ports:
      - '8100:80'
    environment:
      - PMA_HOST=mysql
      - PMA_USER=root
      - PMA_PASSWORD=

Changed nothing.

@nijel
Copy link
Contributor
nijel commented Apr 11, 2017

Ah, there is another problem with handling empty values from environment. Looking for a fix....

So just don't set PMA_USER at all, and it will work with cookie auth.

nijel added a commit that referenced this issue Apr 11, 2017
If environemnt variable is empty and is not part of $_ENV, the getenv
(obviously) returns empty string, but we should use it.

Fixes #118

Signed-off-by: Michal Čihař <michal@cihar.com>
@soullivaneuh
Copy link
Contributor Author

Yeah... but I don't want cookie auth. :-)

I have this configuration on dev env to get rid of this auth form and session limit and get access to this PMA at any time.

BTW, FYI, this configuration always worked for me. Which change did break this part?

@nijel
Copy link
Contributor
nijel commented Apr 11, 2017

The 4.7.0 has different handling of authentication configuration and it did trigger this. But the root cause is that Docker setup for no password was broken, it was just not visible before...

@soullivaneuh
Copy link
Contributor Author

So, will it works when I'll pull your last commit from docker hub with the initial docker-compose configuration?

@nijel
Copy link
Contributor
nijel commented Apr 11, 2017

Yes, it should

@soullivaneuh
Copy link
Contributor Author

Indeed, this is now working.

Thank you for the quick fix! 👍

@nijel nijel self-assigned this Apr 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants