[rt-users] Couldnt open File 'sessions.MYI' in /opt/rt3/var/session_data
John Schubert
johnschubert at yahoo.com
Wed Jul 18 18:58:44 EDT 2007
BINGO!! That's all it took. 2 weeks of down time to
do about 5 minutes of work. You might ask, "How did
they put up with it?" New manager had gone behind me
and started development of a ticketing system within
our Sales database. Also, I had tons of other things
to get done.
Anyway, here's what it took to fix it.
1. Clean out /var partition. I am not a mail guru.
I can do /etc/aliases and basic admin but not really
good at configuring and this is a machine no one logs
into (so no checking mail). Mail had filled up /var.
2. Stopped Apache. I didn't want anyone trying to do
things while I was recovering. Using a typical
redhat, it was: /usr/local/apache/bin/apachectl stop
3. Dropped table called sessions.
[root at localhost john]# mysql -p #entered password at
prompt
mysql> use rt3
Database changed
mysql> DROP TABLE sessions;
4. Create the fixed version, which Google found the
command for here:
http://www.netrifuge.com/rt/etc/schema.mysql
mysql> CREATE TABLE sessions (
-> id char(32) NOT NULL,
-> a_session LONGTEXT,
-> LastUpdated TIMESTAMP,
-> PRIMARY KEY (id)
-> );
5. Started Apache ( /usr/local/apache/bin/apachectl
start), opened up IE (felt the earth shudder), typed
in the URL and, PRESTO!
My description is a little different, but RT seems ok.
Here is what my description of 'sessions' looks like
with that command.
+-------------+-------------+------+-----+-------------------+-------+
| Field | Type | Null | Key | Default
| Extra |
+-------------+---------------+------+-----+-------------------+-------+
| id | varchar(32) | | PRI |
| |
| a_session | longtext | YES | | NULL
| |
| LastUpdated | timestamp(14) | YES | | NULL
| |
+-------------+---------------+------+-----+-------------------+-------+
3 rows in set (0.00 sec)
So, for now all is well. Now to go back and do the
tutorial on DB back up and do it myself, and then
figure out how to automate pushing it to another place
on an all Microsoft shop (on which I have no
permissions anywhere).
Thanks again to everyone.
Regards,
John
--- jmoseley at corp.xanadoo.com wrote:
> OK - here you go:
>
> mysql> describe sessions;
>
+-------------+-------------+------+-----+-------------------+-------+
> | Field | Type | Null | Key | Default
> | Extra |
>
+-------------+-------------+------+-----+-------------------+-------+
> | id | varchar(32) | NO | PRI | NULL
> | |
> | a_session | longtext | YES | | NULL
> | |
> | LastUpdated | timestamp | YES | |
> CURRENT_TIMESTAMP | |
>
+-------------+-------------+------+-----+-------------------+-------+
> 3 rows in set (0.00 sec)
>
>
>
> James Moseley
>
>
>
>
>
>
> John Schubert
>
> <johnschubert at yah
>
> oo.com>
> To
> Sent by: Ole Craig
> <ocraig at stillsecure.com>,
> rt-users-bounces@ Drew Barnes
>
> lists.bestpractic
> <barnesaw at ucrwcu.rwc.uc.edu>
> al.com
> cc
>
> RT-Users at lists.bestpractical.com,
> John Schubert
>
> 07/18/2007 03:38
> <johnschubert at yahoo.com>
> PM
> Subject
> Re:
> [rt-users] Couldnt open File
>
> 'sessions.MYI' in
>
> /opt/rt3/var/session_data
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> I went through the MySQL tutorials and created test
> tables to delete, within test databases and got that
> down. I also went ahead and practiced importing and
> populating fields within a table, from a flat file.
>
> I've gone through all the the RT documentation,
> researched the archives, and even went through all
> of
> the files in my version's archive ( tar file ).
> However I can't find the command that creates the
> table during initial installation. I believe the
> sessions table is actually something very simple
> from
> a post I found in the email archives.
>
> So, I'm asking for a little help since I'm again at
> a
> standstill.
>
> Where is the script that creates the DB to begin
> with?
> Maybe I could use something from initial-database to
> manually create it myself.
>
> Can someone do a show tables and then show what the
> DB
> is expecting (char, number, etc) for fields within
> the
> table 'sessions'? I could just make the command
> myself to create if I know what is being passed to
> MySQL.
>
> Thanks again. It feels like I'm only a step or two
> from getting this back up. If I get it back up, I'll
> create a simple "How-To" on how I recovered from
> this
> for the next noob...and how to avoid.
>
> Respectfully,
> John
>
> --- Ole Craig <ocraig at stillsecure.com> wrote:
>
> > Drew's right, if it's only the sessions table
> > that's gone you're in
> > luck, since that only tracks things related to
> who's
> > currently logged
> > in.
> >
> > And (since I well remember my first attempt to
> > do something with
> > mysql administration that was not scripted by an
> RPM
> > installer... :-)
> > before you do that, it'd probably be worthwhile to
> > run through the
> > "Creating and Using a Database" tutorial at
> >
>
http://dev.mysql.com/doc/refman/5.1/en/database-use.html
> > -- then you'll
> > have a handle on what Drew means by "dropping the
> > table and recreating
> > it from the definitions". Apologies if you're
> > already beyond this level.
> >
> > Good luck,
> > Ole
> >
>
>
>
>
____________________________________________________________________________________
>
> Be a better Globetrotter. Get better travel answers
> from someone who knows.
> Yahoo! Answers - Check it out.
>
http://answers.yahoo.com/dir/?link=list&sid=396545469
> _______________________________________________
>
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from
> O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>
>
>
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting
More information about the rt-users
mailing list