skip to Main Content

I use phpMyAdmin on my web server, which has VirtualMin installed and PHP 7.3 (I’ve also tried previous versions).

The problem I have, is phpMyAdmin would give an error when running larger (not massive) queries. For example, a table with 3 rows, running select * from tbl1 GROUP BY SUBSTRING(extension,1,5); would give this error:

Error in processing request
Error code: 403
Error text: error (rejected)
It seems that the connection to server has been lost. Please check your network connectivity and server status.

So I had a read online, and people said to use SQLBuddy instead, so I have tried this, and exactly the same query gives this error

There was an error receiving data from the server.

3

Answers


  1. You can try below

    1. Change address in your browser from "localhost" to "127.0.0.1".
    2. Increase post_max_size / memory_limit in php.ini file.
    Login or Signup to reply.
  2. the problem is most likely that you try a select * with a group by:

    can you try to change it to this:

    ‘select SUBSTRING(extension,1,5) as test from tbl1 GROUP BY SUBSTRING(extension,1,5);’

    Login or Signup to reply.
  3. The context really is probably your query of "*", all fields. "Group by" is more used for aggregation purposes: min(), max(), avg(), etc. You have no context to what you are trying to get an aggregation for, but grouping by the substring of an extension. If you could supply more details to what your data content is, and why you think GROUP BY is it vs DISTINCT, might provide better answers.

    Now, that said, and not knowing any more of the data, I would start by doing a simple count(*) which returns 1 for any record qualified. May be just as simple as that.

    select 
          SUBSTRING(extension,1,5),
          count(*) NumRecordsWithThisExtension
       from 
          tbl1 
       GROUP BY 
          SUBSTRING(extension,1,5);
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search