Editing values in PhpMyAdmin? - mysql

I've been trying to use PhpMyAdmin for a while, and after a lot went wrong, I finally got it working. However, I have one more question that isn't at the top of my list but would be nice to have solved. How do you edit a value of a column in PhpMyAdmin? Right now I have the fields 'username' and 'password'. I've added a value to them but now I can't find where to edit or remove that value.
Can anyone help me?
Thanks

I found out the solution as I had the same problem.
It's not about versions!
You need to have a column that is primary as it make it unique, otherwhise phpmyadmin would not let you edit from here.
That's why it doesn't work for you either, if you only have the fields 'username' and 'password' and no "id" or so, then no unique column and so can't fast edit.

It probably depends on your version. In my current version (4.4.14), it looks as follows:
After you selected your database & table on the left side, you need to Browse that table (marked yellow). Then you can edit or delete rows. It is even possible to double click a value in a cell to directly edit it (newer versions).

Related

phpMyAdmin not editing correct row

In my phpMyAdmin, when using the built in interface to edit a field in a row, it will always default to an entirely different query in that row.
AS an example, I edit the row with an id of 5, setting the field "health" from 150 to 160, the query that returns is:
UPDATE `database.characters` SET `description`='' WHERE `id`=5
As you can guess, this is very frustrating, as not only has it not done what I've requested, but it's also cleared the description field. Each row in the database has a different behaviour, some will return no query at all, others will edit different fields and some will have no issue whatsoever.
If I construct the query myself everything is fine, but I have designers who want to edit using the interface.
Any help on this matter would be greatly appreciated.

How to change a value of a field using MySQL Workbench?

I have installed MySQL Workbench and I have the following problem.
I perform this simple select query:
SELECT * FROM spring_security.user;
that returns a list of rows.
So, in the output area, I select a field of a specific row and I try to change its value. But I can't do it.
Seems that is is impossible insert a new value for a specific field of a specific row.
Why? How can I use this tool to change a value?
You can do easy with MySql Workbench this way :
in menu database simply connect
then select the database you need and then the table.
Positioning the mouse over the table name in table schemas explore and so you can see on the rightside a table icon.
Selecting/clicking this icon you can see the date in tabular form (like Toad).
With this tabular form you can edit and apply the change
Applying the change MySql Workbench show you the sql code and ask for confirm
(the apply button is on the lower right corner of the table)
Leif Neland's comment on #scaisEdge's answer is the real solution (as indicated by the huge comment-upvote count), so here it is as an answer, to increase its visibility:
Given that:
your query selects from just one table (no join)
the table has a unique primary key
your DB user has permission to UPDATE
Then, in the Result Grid, you can edit a field by one of the following:
Click a field once to select it (the cursor changes into text cursor), and click a second time to start editing in-place in the Result Grid, or
Right click on a the field and select the "Open Value in Editor" option
After editing the value, you need to apply it:
The [apply] and [revert] buttons are at the lower right corner of the table.
— Leif Neland
As shown here:
Also, you can execute next script:
UPDATE table SET cell='new_value' WHERE whatever='somevalue'
This answer may be too late, but in case anyone needs it, MAKE SURE THE TABLE HAS A PK (Primary KEY) if it has a PK you will able to edit it in MySQL Workbanch

Why do *some* DATETIME fields in my database corrupt like this? (MySQL/MSACCESS)

Oddly enough, when I click on one of the fields the correct date and time will appear, but revert to it's previous state (###########) once I click away.
Does any body know what could be causing this? I believe one of the queries is corrupting the DATETIME fields in this program. A query randomly broke earlier when it was appending information into a table, and clearing the table solved the problem.
Lol, widen the column display a little bit and then see :) Thats just because the display field is not wide enough. Its nothing related to the data storage itself. Applies to excel as well. Such a common thing.

Column Input Greyed out in MySQL Workbench

I am using MySQL Workbench 6 CE to create some tables for a new schema I made.
When I create the new table, the application displays a tab which allows me to edit the table name (by default, the name is new_table), select the schema default, and add a comment for the table (though doing that seems to generate syntax errors in the generated SQL).
What it does not do is allow me to specify or configure any of the columns for the table. There is an entire column section that is completely greyed out.
I am logged in as root and root has all privileges for this schema.
Have I found a bug, or is there something special I need to do in order to allow column specification in a table???
Someone please advise...
UPDATE: Adding screenshot as requested...
Click on the encircled double arrow
You will now be able to edit columns. Click on any column name, grey area will become editable now.
When you started creating a new table you can simply add columns by double clicking the empty placeholder row:
I have had the same prb in MySQL Worbench 6.3.6. Here is the link to the solution.
Or just drag down your Output Panel in short !
http://bugs.mysql.com/bug.php?id=79281
You have to checked any key to enable the column name.
please check PK,NN, UQ, B etc then column are ready to edit.

Some columns are hidden in phpMyAdmin

I have about 11 columns in a mysql table and none of them are empty. When I view these columns in the Browse section, some columns are hidden whereas I'm sure they exist.
I have updated phpMyAdmin to latest version (4.1.5) but that did not solve anything. I also exported the table, dropped it and imported it again but nothing changed.
How do I make all the columns visible?
You could look in the exported file to double-check that they exist there.
Another thing to try; from the table, click the SQL tab. The default text will probably say SELECT * FROM `tablename` WHERE 1, try running that and see if you get any different response.
If you click the Structure tab, do you see the columns that are hidden?
Do you have access to the command-line client? If so, can you test showing the table structure there to see if it's different than displayed by phpMyAdmin?
Edit: Have you tried a different browser?
Marc Delisle points out that the column may be hidden within phpMyAdmin; in the Browse tab look to the left of the column headers, there's a T with two arrows -- to the right of that is a small dropdown arrow. Make sure all your columns are selected there. It's doubtful this is the cause of your problem, because you dropped the table and recreated it, but it's the next thing to check.
Can you copy the table to another database for testing, verify that the problem exists there, then truncate the table (remove all data, see the Operations tab to do this), and see if it continues (that will help determine whether it's the structure or the data causing the problem)?
Can you try to export the structure only and recreate the problem on the demo server (log in with the username root and a blank password)? Can you post the structure here? Make sure you obscure any sensitive information if needed.
This question is a duplicate to this one:
phpMyAdmin doesn't show added columns
so here is my duplicate answer! I don't think I have enough kudos to flag this as duplicate yet.
Database phpmyadmin is used to store which columns are hidden, which column a table should be sorted by, etc etc. Table pma_table_uiprefs (phpmyadmin.pma_table_uiprefs) in particular has columns: username; db_name; table_name; and prefs.
I found the row in that table that matches your db_name,user_name and table_name, and deleted it. That reset the layout back to showing all columns!
The prefs column is text, and it's format could probably be deciphered if you have some spare time and energy, but deleting the row is easy and you can then adjust the layout again in phpmyadmin, and the row will be recreated in phpmyadmin.pma_table_uiprefs.
I was authenticated as root when doing this.
i just solved this with a relatively easy fix! (finally my time to give back :) )
For anyone reading in future, go to operations (top row, same as browse, structure etc). Then under Copy table to (database.table): just change the name of the table, press go. This will create a duplicate that should be fine.
Go to the same area of the problematic table and DROP it under Delete data or table. This will delete the table.
Now go to the operations of your new page and rename the table to the way it was. Like in the image linked.
Image of where to go in PHP Admin: