mySQL/Drupal/phpMyAdmin
November 6, 2006 4:18 PM   Subscribe

mySQL/Drupal/phpMyAdmin: I've got this error in my Drupal DB, and I understand what I'm supposed to do to fix it, but I don't know how to get jiggy in my database.

The fix explains itself as if I had mySQL knowledge that I don't have. I'm fine with that, but I'm not fine with goofing around in phpMyAdmin and possibly horking all my content.

Could someone give me a step by step on the right way to access the DB table in question?
posted by sciurus to Computers & Internet (5 answers total) 1 user marked this as a favorite
 
1. SELECT nid FROM node ORDER BY nid DESC LIMIT 1

You'll get a value. I'm going to use 27 for an example.

2. UPDATE sequences SET id="27" WHERE name = "node_nid"


That's about all.
posted by genghis at 4:33 PM on November 6, 2006


Oh, and you can run queries directly in phpmyadmin but since I've never used the thing, you'll need to figure out which link to push to get there.

That said, if you do a backup, there's a limit to what can get screwed up. Have at it.
posted by genghis at 4:36 PM on November 6, 2006


how to get to genghis' advice:

* pick your database from the dropdown in the lefthand frame

* click on the "SQL" tab and click Go

* enter that first query and write down the result

* for extra paranoia, I'm going to assume that you'd like a backup, in case something crazy happens, so....

* find the sequences table in the lefthand frame. click on the name.

* click on the Export tab. make sure both "structure" and "data" are checked. click Go.

* copy the text on the following page into a text file and save it as somelogicalname.sql

* click on "Table:sequences" at the top of the righthand frame.

* click on the SQL tab, type in the 2nd query (with the appropriate number) and click Go again.

At that point, it should be all fixed.
posted by epersonae at 4:51 PM on November 6, 2006


Response by poster: Thanks to both of you!
posted by sciurus at 4:28 AM on November 7, 2006


Response by poster: This comment was also necessary for my particular error.
posted by sciurus at 4:40 AM on November 7, 2006


« Older Why does my circut keep blowing up?   |   Do I have a Ghost of a chance? Newer »
This thread is closed to new comments.