Main Stories
Slash Boxes

Slash Open Source Project

Slashcode Log In

Log In

[ Create a new account ]

Article Poll

Poll I found this article to be
Very Helpful
Helpful
Not Helpful
Not Very Helpful
[ Results | Polls ]
Comments:0 | Votes:0

How to roll back from MySql 3.23 to 3.22?

posted by Krow on 02:10 PM January 9th, 2001   Printer-friendly   Email story
SuperBusTerror writes "I would really like to put up a SlashLog on my home page, but am currently running MySql 3.23 on RHL 6.2. How would I go about rolling it back to 3.22 so it will work with the SlashCode? -- Aaron -- aaron@aaron1.net"
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login
Loading... please wait.
  • Yeah, you could do that, but I remember seeing this discussed on the slash list. I think there might be a way to get MYSQL to allow -1 as a primary key, which I think is the only reason why slash doesn't work on the latest version of mysql.

    It has to do with the use of -1 as a UID in an AUTONUMBER field, which isn't allowed in 3.23 with the ISAM table types. The general solution is to change the -1 to 0 or something else, but it's scattered so widely throughout the code that most people conclude it is

    --
    Steve Linberg, Chief Goblin
    Silicon Goblin Technologies [silicongoblin.com]
  • Bender is being developed (in part) on 3.23. It should work fine with 3.22 or 3.23. It does in all of our testing.
  • Oh, quit whining. You're just upset because I raped and pillaged your daughter, and sold her to a slavetrader.

    -- The WIPO Troll. You have been trolled.

  • by Clifton Wood (822) on Thursday January 11 2001, @01:39PM (#701)
    What you need to do is to edit the schema files so that a "TYPE=ISAM" appears at the end of each CREATE TABLE statement. This causes MySQL to use the older, 3.22 behavior for auto_increment columns which is the major problem with the existing release versions of Slash and newer versions of MySQL.
  • Hrm. That sounds messy. Did you build from source or use some other method? I'm afraid there may not be a lot to do other than do that file-by-file manual comparison you were referring to. No, don't rename /usr; everything will break horribly if you do. :) At this point you might want to consider whether you want to preserve that 3.23 installation that seems to be somewhat scattered. If it were me, I think I'd start by exporting my databases from 3.23 as I discussed above, and then remove every last
    --
    Steve Linberg, Chief Goblin
    Silicon Goblin Technologies [silicongoblin.com]
  • Yeah, you could do that, but I remember seeing this discussed on the slash list. I think there might be a way to get MYSQL to allow -1 as a primary key, which I think is the only reason why slash doesn't work on the latest version of mysql.
    -- It's either on the beat or off the beat, it's that easy.
    --

    --
    It's either on the beat or off the beat, it's that easy.
  • Thanks Steve, for the info. I am trying to do that now, but have one more problem... When I installed v3.23, I think I installed MySQL into a non-standard directory. I don't remember where it is, and don't know how to determine which directory is the "MySQL Directory". What specific files will i find in the official "MySQL directory"? How do I know it's the right one? Pardon my newbieness! -- Aaron
  • Funny, I didn't know you could "pillage" a person...
  • I may also try this Clif, but how does one do it?

    -- Aaron
  • You could start with "locate mysql", which will spill out a lot of information about all mysql-related files, matching any file whose path or name includes "mysql".

    "which mysqld" will locate the running mysqld.

    When you build from source, the default location is /usr/local/mysql/, which contains just about everything except the startup files. If you installed from RPM or some other method it might be somewhere else, but the "locate msql" above should give you some clues.

    You can rename the mysql directory (after stopping the daemon with "mysqladmin -u root -p shutdown") to something like mysql-3.23, and then do a clean install of 3.22. I recommend building from source if you have the tools; it's pretty simple, and gives you more control if you want it. It takes a while, about as long as building a kernel in my experience.

    If you want to copy your old databases, the safest thing to do is export them from the old system before you shut it down with "mysqldump" and then slurp them back in to the new system with the mysql client. For example:

    mysqldump -eql -u root -p database_name > database_name.sql

    Then, after you've shut down, installed the new build, and launched the new daemon:

    mysqladmin -u root -p create database_name
    mysql -u root -p < database_name.sql

    Shout if that's not clear, or read the man pages! :)

    Good luck.

    Steve Linberg, Chief Goblin
    Silicon Goblin Technologies [silicongoblin.com]
    --
    Steve Linberg, Chief Goblin
    Silicon Goblin Technologies [silicongoblin.com]
  • It's pretty simple. Shut down the database server, rename your mysql directory (to preserve the old install), and rebuild from source. If you have databases you want to preserve, do a mysqldump on them before you shut down, and then slurp them into the 3.22 version with the mysql client. Don't just copy the var directories. If you need more detail, post again.

    Or, you could wait for Bender, which ostensibly will support 3.23. (Right, guys?)

    Steve Linberg, Chief Goblin
    Silicon Goblin Technologies [silicongoblin.com]
    --
    Steve Linberg, Chief Goblin
    Silicon Goblin Technologies [silicongoblin.com]
  • OK, I figured it out. When I installed MySQL v3.23.26 a few months ago, I apparently installed directly into /usr. The files in /usr/bin match the files in /usr/local/mysql/bin, which is where I installed v3.22.32 yesterday. Also, the files in /usr/share match the files in /usr/local/mysql/share.

    What can I do now? I assume I can't rename /usr. One option is to find all the files in all the /usr subdirectories that pertain to MySQL v3.23.26 and move, delete, or rename them. Could I just install v3.22.32 into /usr? Would that "overwrite" the 3.23.26 files?

    And is there something special I have to do with mysqld?

    Thanks again for the help.

    -- Aaron
    -- aaron@aaron1.net