Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access a bookmarked query in PhpMyAdmin?

Tags:

phpmyadmin

I bookmarked a MySQL query in phpMyAdmin. How do I access it? I looked all over PhpMyAdmin but could not locate it.

like image 748
Arjun Singh Avatar asked Aug 24 '14 17:08

Arjun Singh


People also ask

What is a bookmark in a query?

Any query that is executed can be marked as a bookmark on the page where the results are displayed. You will find a button labeled Bookmark this query just at the end of the page. As soon as you have stored a bookmark, that query is linked to the database.

How can I get SQL query from a table in phpMyAdmin?

If you have access to phpMyAdmin, you can get this code through the Export tab on the table that you require. Select SQL then make sure you export "Structure" ("CREATE table" code) and "Data" ("INSERT" code) with Export type set to "INSERT".

How do I view phpMyAdmin logs?

In phpMyAdmin 4.0, you go to Status > Monitor. In there you can enable the slow query log and general log, see a live monitor, select a portion of the graph, see the related queries and analyse them. Show activity on this post. Show activity on this post.


4 Answers

My phpMyAdmin Version is 4.5.2 and I'm to new to be allowed to add images to a post so I will try to describe how to get to the saved bookmarks the best I can. On the main page after you have logged in Click on one of the database names in the left column. When the database structure view comes up there is a small icon at the bottom left of that view. You might have to scroll down to see it and it looks a small command prompt window with the word Console next to it. Click on that and if it is too narrow to see anything you can drag it upward to make it larger. you may only see the title bar with clickable tabs click on the Bookmarks one and if you have saved Bookmarks they will be visible in the box below. Then as your mouse passes over the Bookmarked sqls a clickable bar appears over the sql or query with choices "Expand", "Requery", "Edit" and "Delete".

Hope this works

like image 113
Cal R Avatar answered Sep 26 '22 23:09

Cal R


You may try to use the SQL History feature like this:

enter image description here

like image 26
Rahul Tripathi Avatar answered Sep 23 '22 23:09

Rahul Tripathi


For that go to php myadmin and click on sql tab. in that window there is option like get auto-saved query. click on it. you will get your saved query back. now click on Go button and execute it.

above option is use when you saved your query without provide name. and if you have bookmarked your query with name then use below option.

Go to SQL tab and there is bookmarked query option. Click any bookmarked query from dropdown menu and execute it.

like image 40
Adarsh Bhatt Avatar answered Sep 22 '22 23:09

Adarsh Bhatt


To run the bookmarked query, select the database your query is for (usually in the left-hand column in phpMyAdmin). Then go to "SQL" at the top of the screen. You should then see a section on the page called "Bookmarked SQL query" with a drop-down selector for any bookmarked SQL queries you have.

phpMyAdmin bookmarked queries

I run into the problem that phpMyAdmin seems to duplicate my bookmarked SQL queries when I edit them, and then both the old and new queries are stored with the same bookmark name. To find out what the query SQL actually is, you need to do the following:

  • View the source of the list of bookmarked queries in the drop-down SQL. The IDs of each bookmark are stored in the HTML, e.g.:
<option value="123">Bookmark_name_1</option>
<option value="72">Bookmark_name_2</option>
  • In phpMyAdmin, go to "SQL" and paste in the following SQL query:
SELECT
id, label, CONVERT( query USING utf8 ) as query 
FROM pma_bookmark
WHERE id IN ( 72, 123 );
  • When you hit "Go" you should see the queries in plain text.

  • You can then go to the pma_bookmark table in the phpmyadmin database and delete the query with the ID you don't want.

like image 34
Sam Critchley Avatar answered Sep 23 '22 23:09

Sam Critchley