any sql query in phpmyadmin in docker results in #1146 - Table 'DBNAME.columns_priv' doesn't exist

22 Views Asked by At

I install phpadmin + mysql using the following docker compose setup:

version: '3'

services:
  mysql:
    image: mysql:latest
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: PASSWORD1
      MYSQL_DATABASE: test
      MYSQL_USER: USER
      MYSQL_PASSWORD: PASSWORD2
    ports:
      - "3306:3306"
    volumes:
      - mysql_data:/var/lib/mysql

  phpmyadmin:
    image: phpmyadmin/phpmyadmin:latest
    restart: always
    environment:
      PMA_ARBITRARY: 1
    ports:
      - "8080:80"
    depends_on:
      - mysql

volumes:
  mysql_data:

My laptop uses linux mint v21.3.

I installed, configured and ran the images with

docker compose up -d

  • everything seems to work fine.

Any manual sql operation, such as creating table, inserting, altering, manually (i.e. via the GUI) works.

The problem is when I go to the SQL tab, no matter what sql command I try, I get this error:

#1146 - Table 'DBNAME.columns_priv' doesn't exist

I understand that columns.priv has something to do with privilages, but I logged in as root, so privilages shouldn't be a problem.

I tried to run sql command from the SQL pannel when running them on a specific table or an entire DB - the error is always the same.

Here is a screenshot:

The error:

trying to run sql command from myphpadmin on exsting table

The only way that I can run a SQL command is from the "browse" tab, when I click on "edit inline". Then, and only then, the command works.

screenshot - without commands, just by navigating to the "browse" tab: browse tab, no command run

screenshot - "browse" tab, editing inline - commands are fine:

sql commadns are ok in browse tab

I looked at the following questions:

Strange error phpMyAdmin\MariaDB

How to resolve blank errors for Xampp phpMyAdmin and MySQL

but none of them seems to solve anything.

Running the exact same command from mysql cli - works, so it seems to be somthing with phpmyadmin.

0

There are 0 best solutions below