38

By default, phpMyAdmin shows me 30 rows whenever I load a table (the query contains "LIMIT 30"). I generally want to see (up to) a few hundred rows.

Is there a way to change that default setting?

Nathan Long
  • 122,748
  • 97
  • 336
  • 451

10 Answers10

41

Using phpMyAdmin version 3.4 and above you are able to change the default rows shown by:

On the phpMyAdmin home screen click Settings >> Main frame >> Browse mode and altering the value within Maximum number of rows to display.

AllInOne
  • 1,450
  • 2
  • 14
  • 32
Rick
  • 411
  • 4
  • 2
  • 3
    +1! Thanks for bringing an updated answer to an old question! I'm no longer using phpAdmin, so I can't confirm this, but if it's correct, it should be the accepted answer. Can anyone else confirm? – Nathan Long Aug 02 '12 at 10:38
  • 1
    It works. This is better answer, if you don't have access to phpmyadmin config file. – psycho brm Aug 21 '12 at 12:08
  • Works great and it is per user, so every user can set it the way he wants. – almo Dec 09 '14 at 13:50
  • 1
    Looks like in 4.x now it's `Home` > `More Settings` > `Main Panel` > `Browse Mode`. – Tobias J Dec 07 '16 at 16:04
  • Tobias J is correct. I'm glad the option is there, less glad that the limit is 25 by default now. There really is no risk of "hanging the server" from fetching 500 rows in 99.99% of what PHPMyAdmin is used for. – Henrik Erlandsson Jan 24 '20 at 10:09
36

In your phpMyAdmin directory, there will be a file called "config.inc.php".

Find the line where it sets the MaxRows value:

$cfg['MaxRows'] = 1000;

And change the value to whatever you want.

BraedenP
  • 7,125
  • 4
  • 33
  • 42
  • 8
    In my copy, that line didn't exist, so I added it. – Nathan Long Sep 11 '09 at 21:21
  • 5
    a helpful setting in that regard is $cfg['RepeatCells'] = 50, which defines when the header / columnnames should be repeated. Here: every 50 lines. – SunnyRed Aug 02 '11 at 12:32
  • 10
    In newer versions of phpMyAdmin you can change this setting directly by going to Preferences > Main Frame > Browse Mode > Maximum number of rows to display. – Xkeeper Dec 20 '11 at 16:44
  • 1
    There's an option to save it to a configuration file you can later reload, or just save it to your browser's local storage (for more modern browsers). If you go the browser storage route, it'll prompt you when you open PMA in a new session about loading it. – Xkeeper Mar 12 '12 at 23:15
  • Another point that tripped me up. I am managing multiple servers through phpmyadmin, so I kept adding this configuration into config.inc.php like this: $cfg['Servers'][$i]['MaxRows'] = 100; This will NOT work! This setting is site-wide and not server-specific. Just put it into config.inc.php as shown above. – IvanD Sep 12 '13 at 22:49
  • on ubuntu 12.04LTS using apt installed phpmyadmin config.inc.php is pulled from /var/lib/phpmyadmin/config.inc.php, not the root of the phpmyadmin install as stated in Documentation.html – bill davis Sep 09 '14 at 01:51
  • @fn27 What do you mean, it's temporary? I just tried it, reloaded page, tried with a different browser, but the setting stayed. – Abraham Murciano Benzadon May 16 '17 at 13:11
11

I have no access to config.inc.php

To show more records I add to my query:

LIMIT 0,1000;

to show 1,000 records, from 0 to 1000.

You can change 1000 to any number according to your needs.

One example:

SELECT id, folio, sucursal
FROM equipos
WHERE sucursal = 3
ORDER BY folio
LIMIT 0,1000;

Greetings from Mexico!

gmadd
  • 1,146
  • 9
  • 18
Alain
  • 137
  • 1
  • 2
  • 1
    The question doesn't ask how to change the limits on the query, it asks how to change the default setting. – Abraham Murciano Benzadon May 16 '17 at 13:13
  • @AbrahamMurcianoBenzadon Be that as it may, this is a fantastically useful answer for running one off heavy queries that return more than the default number of rows. Otherwise you have to update the default or run the query twice, the first time to get access to the show all button! – Arth Aug 21 '18 at 14:37
  • This was extremely helpful to me. I work on a lot of shared hosting sites and on projects where multiple remote multiple people all using the same phpmyadmin. Thanks for posting – gmgj Feb 25 '19 at 17:49
3

Already Checked..... Simple Steps Follow:-

  1. Go PhpAdmin
  2. Select Your Table
  3. In Your table there is a field name Show, Which is actually a Button. Here two boxes present like(Start row(0) Number of Rows(1000) Header every(100)). ----
  4. Press on Show button.
gopal sharma
  • 129
  • 1
  • 6
2

There is a config setting for this:

http://www.phpmyadmin.net/documentation/Documentation.html#cfg_MaxRows

Dextro
  • 31
  • 2
2

If you don't have access to the installation files, you should use Ricks answer with "click Settings >> Main frame >> Browse mode and altering the value within Maximum number of rows to display", but it can be that this does not take effect for other users. If so, you can:


  • login as root
  • choose database phpmyadmin
  • select table pma_userconfig
  • search for the user in question (field username)
  • edit the field config_data by adding e.g. "MaxRows":1000 to the contents in brackets, e.g. results in {"MaxRows":1000,"lang":"de"}

Hope that helps.

Magnum
  • 43
  • 4
1
  1. Find the file config.inc.php in your phpmyadmin directory

  2. Edit it in any text editor

  3. look for the line which contains the word $cfg['MaxRows']
  4. if it has value like this ($cfg['MaxRows'] = 30; ) just edit the number (30) to the number of rows you like -- if that line doesn't exist just Add it at the end of the file before the ?> tag as follow:

As shown in the picture

......

$cfg['MySQLManualBase'] = 'http://dev.mysql.com/doc/refman/5.1/en';
$cfg['MySQLManualType'] = 'searchable';

$cfg['MaxRows'] = 1000;

?>
Jean-François Corbett
  • 37,420
  • 30
  • 139
  • 188
0

phpMyAdmin has a config file called config.inc.php. You should be able to find appropriate setting in there.

Eimantas
  • 48,927
  • 17
  • 132
  • 168
0

just add the line : $cfg['MaxRows'] = 300; to /etc/phpmyadmin/config.inc.php (ubuntu)

0

The answers that refer to updating the MaxRows value in config.inc.php are correct, however, they fail to mention that this setting may be missing from config.inc.php.

The more complete procedure is as follows:

  1. Find the file config.inc.php in your phpMyAdmin directory and open this in an editor
  2. Look for the line that starts with $cfg['MaxRows']
  3. If it is commented out, remove the '//' in front of the $cfg...
  4. If the line is not present (it is missing in the default installation) then go to the bottom of the document and add the row

    $cfg['MaxRows'] = 50;

  5. You can set the value for the 'MaxRows' attribute can be set to any one of the following: 25, 50, 100, 250, 500

  6. Save the document and restart

Notice that there is a file called config.sample.inc.php in the phpMyAdmin directory. If you open this, you will see a list of possible settings (and some explanations) that you can add to your config.inc.php file to further configure phpMyAdmin.

I hope that this helps.

Clinton
  • 1,111
  • 1
  • 14
  • 21