I am using phpMyAdmin version 4.2.11. At the time of writing, my Status
tab looks like this (a few options expanded; note «Current settings», bottom right):
Note, there are no directly visible «features» that allow for the enabling of things such as slow_query_log
. So, I went digging on the internet because UI-oriented answers will only be relevant to a particular release and, therefore, will quickly become out of date. So, what do you do if you don’t see a relevant answer, above?
As this article explains, you can run a global query to enable or disable the slow_query_log
et al. The queries for enabling and disabling these logs are not difficult, so don’t be afraid of them, e.g.
SET GLOBAL slow_query_log = 'ON';
From here, phpMyAdmin is pretty helpful and a bit of Googling will get you up to speed in no time. For instance, after I ran the above query, I can go back to the «Instructions/Setup» option under the Status tab’s Monitor
window and see this (note the further instructions):
I am using phpMyAdmin version 4.2.11. At the time of writing, my Status
tab looks like this (a few options expanded; note «Current settings», bottom right):
Note, there are no directly visible «features» that allow for the enabling of things such as slow_query_log
. So, I went digging on the internet because UI-oriented answers will only be relevant to a particular release and, therefore, will quickly become out of date. So, what do you do if you don’t see a relevant answer, above?
As this article explains, you can run a global query to enable or disable the slow_query_log
et al. The queries for enabling and disabling these logs are not difficult, so don’t be afraid of them, e.g.
SET GLOBAL slow_query_log = 'ON';
From here, phpMyAdmin is pretty helpful and a bit of Googling will get you up to speed in no time. For instance, after I ran the above query, I can go back to the «Instructions/Setup» option under the Status tab’s Monitor
window and see this (note the further instructions):
Я использую phpMyAdmin версии 4.2.11. На момент написания моей вкладки моя вкладка Status
выглядит следующим образом (несколько вариантов расширены, обратите внимание на «Текущие настройки», внизу справа):
Обратите внимание, что нет прямых видимых «функций», которые позволяют включить такие вещи, как slow_query_log
. Итак, я пошел в Интернете, потому что ориентированные на пользовательский интерфейс ответы будут иметь отношение только к определенному выпуску и, следовательно, быстро устареют. Итак, что вы будете делать, если не см. Соответствующий ответ выше?
Как объясняется в статье вы можете запустить глобальный запрос, чтобы включить или отключить slow_query_log
et al. Запросы на включение и отключение этих журналов не сложны, поэтому не бойтесь их, например.
SET GLOBAL slow_query_log = 'ON';
Отсюда phpMyAdmin очень полезен, и немного Googling поможет вам быстро и быстро. Например, после выполнения вышеуказанного запроса я могу вернуться к опции «Инструкции/Настройка» в окне «Состояние» Monitor
и увидеть это (обратите внимание на дальнейшие инструкции):
phpMyAdmin — это бесплатный инструмент для управления базами данных MySQL. Он может использоваться для создания, изменения и удаления таблиц, добавления новых записей, выполнения запросов и многого другого. Однако, как и любое программное обеспечение, phpMyAdmin не является идеальным, поэтому возможны ошибки при его использовании.
Шаг 1: Отслеживание ошибок
Первый шаг в отладке phpMyAdmin — это отслеживание ошибок. Когда что-то идет не так, phpMyAdmin может выдавать сообщения об ошибках на экране. Но даже если вы не видите сообщения об ошибках, вы можете настроить phpMyAdmin таким образом, чтобы он записывал ошибки в файл журнала.
Чтобы включить запись ошибок в файл журнала, вы должны открыть файл «config.inc.php» в корневой директории phpMyAdmin и добавить следующие строки:
ini_set('display_errors', 0);
ini_set('log_errors', 1);
ini_set('error_log', '/path/to/error.log'); // заменить на путь к вашему журналу ошибок
Шаг 2: Просмотр журнала ошибок
После того, как вы настроили phpMyAdmin на запись сообщений об ошибках в файл журнала, вы должны проверить этот файл, чтобы увидеть, какие ошибки возникают при использовании phpMyAdmin. Журнал ошибок находится в файле, который вы определили в строке «error_log» в предыдущем шаге.
Чтобы просмотреть файл журнала ошибок, вы можете использовать любой текстовый редактор или командную строку. Если вы используете командную строку, вы можете ввести следующую команду:
tail -f /path/to/error.log
Это откроет файл журнала ошибок в реальном времени, что позволит вам видеть новые сообщения об ошибках, как только они появятся.
Шаг 3: Исправление ошибок
После того, как вы обнаружили ошибку в phpMyAdmin, вы можете начать ее исправлять. Но что именно вам нужно делать, зависит от того, какая ошибка возникла.
Если ошибка связана с SQL-запросом, вы можете использовать встроенный SQL-дебаггер в phpMyAdmin, чтобы узнать, какой запрос привел к ошибке и почему он не выполнен. Для этого откройте вкладку «SQL» в phpMyAdmin, скопируйте запрос, который вызывает ошибку, и вставьте его в поле для выполнения запроса. Затем нажмите кнопку «Вывести (без изменения)» и посмотрите на сообщения об ошибках.
Если проблема не связана с SQL-запросом, а скорее с конфигурацией phpMyAdmin или MySQL, вам может потребоваться связаться с командой поддержки или проконсультироваться со специалистом по базам данных.
Заключение
Отладка phpMyAdmin может быть сложной и трудоемкой задачей, но если вы следуете этим простым шагам, вы сможете быстро найти и исправить большинство ошибок, которые могут возникнуть при использовании phpMyAdmin. Кроме того, помните, что регулярное обслуживание базы данных и sql-запросов может помочь предотвратить ошибки в будущем.
I am using phpMyAdmin version 4.2.11. At the time of writing, my Status
tab looks like this (a few options expanded; note «Current settings», bottom right):
Note, there are no directly visible «features» that allow for the enabling of things such as slow_query_log
. So, I went digging on the internet because UI-oriented answers will only be relevant to a particular release and, therefore, will quickly become out of date. So, what do you do if you don’t see a relevant answer, above?
As this article explains, you can run a global query to enable or disable the slow_query_log
et al. The queries for enabling and disabling these logs are not difficult, so don’t be afraid of them, e.g.
SET GLOBAL slow_query_log = 'ON';
From here, phpMyAdmin is pretty helpful and a bit of Googling will get you up to speed in no time. For instance, after I ran the above query, I can go back to the «Instructions/Setup» option under the Status tab’s Monitor
window and see this (note the further instructions):
Подскажите, где могут находится логи подключений к phpmyadmin?
-
Вопрос заданболее года назад
-
320 просмотров
Пригласить эксперта
Это указывается в настройках веб-сервера. Например, если используется веб-сервер Apache2 под операционной системой Debian или Ubuntu, логи по умолчанию хранятся в /var/log/apache2. Если phpmyadmin запущен на хостинге, то хостер обычно сохраняет логи в каталог logs внутри домашнего каталога.
-
Показать ещё
Загружается…
04 июн. 2023, в 18:48
300 руб./за проект
04 июн. 2023, в 16:44
30000 руб./за проект
04 июн. 2023, в 16:33
2500 руб./за проект
Минуточку внимания
Я использую phpMyAdmin версии 4.2.11. На момент написания моей вкладки моя вкладка Status
выглядит следующим образом (несколько вариантов расширены, обратите внимание на «Текущие настройки», внизу справа):
Обратите внимание, что нет прямых видимых «функций», которые позволяют включить такие вещи, как slow_query_log
. Итак, я пошел в Интернете, потому что ориентированные на пользовательский интерфейс ответы будут иметь отношение только к определенному выпуску и, следовательно, быстро устареют. Итак, что вы будете делать, если не см. Соответствующий ответ выше?
Как объясняется в статье вы можете запустить глобальный запрос, чтобы включить или отключить slow_query_log
et al. Запросы на включение и отключение этих журналов не сложны, поэтому не бойтесь их, например.
SET GLOBAL slow_query_log = 'ON';
Отсюда phpMyAdmin очень полезен, и немного Googling поможет вам быстро и быстро. Например, после выполнения вышеуказанного запроса я могу вернуться к опции «Инструкции/Настройка» в окне «Состояние» Monitor
и увидеть это (обратите внимание на дальнейшие инструкции):
-
#1
Where i can check whats going on in log file where phpMyAdmin errors exist?
I was uploading an directadmin backup of an sql file into PhpMyAdmin from import page and got internal server error in middle of upload 61%. Upload took ~10 seconds before interruption. The file was 19mb and i checked every php.ini file variable which all looked ok.
max_execution_time 600 600
max_input_time 600 600
memory_limit 1000M 1000M
post_max_size 1000M 1000M
Importing worked only with other smaller file where i partly exported only some tables from the same database. The sql filesize was 7mb.
It also worked with command-line.
mysql -u myuser -p mydatabase < myfile.sql
Thanks
Last edited: Feb 3, 2020
-
#2
check max_allowed_packet at mysql config
-
#3
You can check if there is a error log at this path: /var/www/html/phpMyAdmin-5.0.1-all-languages/log/
Also maybe check: /var/log/httpd/error_log
Also remember to check this value in php.ini: upload_max_filesize
(you did not mention it in your post)
-
#4
This folder contains only .htaccess file
/var/www/html/phpMyAdmin-5.0.1-all-languages/log/
Also maybe check: /var/log/httpd/error_log
Found my error here:
ModSecurity: Request body (Content-Length) is larger than the configured limit (13107200).
UPDATE: It weird if i save changes in the comodo plugin and restart apache, after that i do CTRL+F5 on the plugin config page, then the old parameters are all back like the new ones never saved. But it said it saved and restarted the server. I have removed the plugin and reinstalled it many times now, still the same issue but i was able to change SecRequestBodyNoFilesLimit value from conf file located at /etc/httpd/conf/extra/httpd-modsecurity.conf
Also remember to check this value in php.ini:
upload_max_filesize
(you did not mention it in your post)
Yes, forgot to mention, it was set to:
upload_max_filesize = 1024M
Thank You
Last edited: Feb 4, 2020
I’m trying to track down a bug that’s deleting rows in a mysql
table.
For the life of me I can’t track it down in my PHP
code, so I’d like to work backwards by finding the actual mysql query that’s removing the rows.
I logged in to phpmyadmin, but can’t find a way to view the history of past sql operations.
Is there a way to view them in phpmyadmin?
asked Jul 14, 2010 at 14:38
5
Ok, so I actually stumbled across the answer.
phpMyAdmin does offer a brief history. If you click on the ‘sql’ icon just underneath the ‘phpMyAdmin’ logo, it’ll open a new window. In the new window, just click on the ‘history’ tab.
That will give you the last twenty or so SQL operations.
answered Jul 14, 2010 at 15:21
chris1979chris1979
2,6673 gold badges16 silver badges6 bronze badges
6
There is a Console tab at the bottom of the SQL (query) screen. By default it is not expanded, but once clicked on it should expose tabs for Options, History and Clear. Click on history.
The Query history length is set from within Page Related Settings which found by clicking on the gear wheel at the top right of screen.
This is correct for PHP version 4.5.1-1
answered Oct 28, 2015 at 10:08
3
You just need to click on console at the bottom of the screen in phpMyAdmin and you will get the Executed history:
simhumileco
31.2k16 gold badges137 silver badges112 bronze badges
answered May 4, 2018 at 9:31
2
To view the past queries simply run this query in phpMyAdmin.
SELECT * FROM `mysql`.`general_log`
if it is not enabled, run the following two queries before running it.
SET GLOBAL log_output = 'TABLE';
SET GLOBAL general_log = 'ON';
answered Jan 20, 2016 at 5:45
2
I don’t think phpMyAdmin lets you do that, but I’d like to hear I’m wrong.
On the other hand you can enable query logging in MySQL: The General Query Log
answered Jul 14, 2010 at 14:43
baolbaol
4,35234 silver badges44 bronze badges
0
Yes, you can log queries to a special phpMyAdmin DB table.
See SQL_history.
simhumileco
31.2k16 gold badges137 silver badges112 bronze badges
answered Dec 2, 2010 at 11:21
blueyedblueyed
26.9k4 gold badges75 silver badges71 bronze badges
1
I am using phpMyAdmin Server version: 5.1.41.
It offers possibility for view sql history through phpmyadmin.pma_history
table.
You can search your query in this table.
pma_history
table has below structure:
simhumileco
31.2k16 gold badges137 silver badges112 bronze badges
answered Jul 8, 2013 at 5:09
DhinakarDhinakar
4,0515 gold badges36 silver badges68 bronze badges
You have to click on query window just below the phpMyAdmin logo, a new window will open.
Just click on SQL History tab. There you can see history of SQL Queries.
answered Apr 10, 2014 at 7:04
OK so I know I’m a little late and some of the above answers are great stuff.
As little extra though, while in any PHPMyAdmin page:
- Click SQL tab
- Click ‘Get auto saved query’
this will then show your last entered query.
answered Oct 29, 2016 at 15:22
JackhererJackherer
471 silver badge8 bronze badges
I may be wrong, but I believe I’ve seen a list of previous SQL queries in the session file for phpmyadmin sessions
answered Jul 14, 2010 at 15:04
Mark BakerMark Baker
209k32 gold badges342 silver badges384 bronze badges
1
Here is a trick that some may find useful:
For Select queries (only), you can create Views, especially where you find yourself running the same select queries over and over e.g. in production support scenarios.
The main advantages of creating Views are:
- they are resident within the database and therefore permanent
- they can be shared across sessions and users
- they provide all the usual benefits of working with tables
- they can be queried further, just like tables e.g. to filter down the results further
- as they are stored as queries under the hood, they do not add any overheads.
You can create a view easily by simply clicking the «Create view» link at the bottom of the results table display.
answered Feb 11, 2021 at 5:41
you can run your past mysql with run /PATH_PAST_MYSQL/bin/mysqld.exe
it run your last mysql and you can see it in phpmyadmin and other section of your system.
notice: stop your current mysql version.
S F My English.
answered Oct 10, 2018 at 18:58
why dont you use export, then click ‘Custom — display all possible options’ radio button, then choose your database, then go to Output and choose ‘View output as text’ just scroll down and Go. Voila!
answered May 21, 2019 at 4:29