Mailinglist Archive: opensuse (3666 mails)

< Previous Next >
Re: [SLE] MySQL Table Locked?
  • From: Andy Choens <andy.choens@xxxxxxxxx>
  • Date: Mon, 28 Mar 2005 15:34:07 -0500
  • Message-id: <200503281534.07248.andy.choens@xxxxxxxxx>
On Monday 28 March 2005 3:53 am, Brad Dameron wrote:
> Sounds like a corrupt table. Run this command from the commandline as root:
>
> mysqlcheck -r -A
>

Didn't help. Mysql seems to think it is fine. In fact, after thinking about
it some more, I decided to try backing up the table and restoring it. In
this schema I have 4 tables. The other 3 are working just fine. So, I made
a sql back-up of the one table that's not working correctly. Then, I dropped
the table. After that I resored my back-up. That went very smoothly, but
the table isn't acting right. For instance, if I use konqui to edit the
table, when I try to go and edit the contents of a row, I get this error:

SQL KIOSlave: An error has occured
Could not execute query. Could not access adults

You might suggest my permissions aren't correct, but I can access the other
tables just fine, so my permissions are fine and so is my connection between
QT and mysql. I've also tried logging into mysql as root, and I get the same
results.

Using mysqladministrator, I renamed the table adults to contacts, but that
didn't help either, so I changed it's name back. It let me change it's name.

To see if it means anything to anybody, I've inserted the SQL that I got from
the back-up. I had to not include the data itself, sorry. I can't post that
on the internet!

--andy

SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT;
SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS;
SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION;
SET NAMES utf8;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS,
FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=NO_AUTO_VALUE_ON_ZERO */;


CREATE DATABASE /*!32312 IF NOT EXISTS*/ `tlp`;
USE `tlp`;
CREATE TABLE `adults` (
`parent_number` int(11) NOT NULL auto_increment,
`camper_number` int(3) NOT NULL default '0',
`camper_number_2` int(3) default '0',
`primary_contact` char(3) NOT NULL default '1',
`mail` char(3) NOT NULL default '0',
`role` varchar(11) default '',
`first_name` varchar(50) default NULL,
`middle_name` varchar(20) default NULL,
`last_name` varchar(20) NOT NULL default '',
`cellphone` varchar(20) default '',
`homephone` varchar(20) NOT NULL default '',
`workphone` varchar(20) default '',
`address_1` varchar(50) NOT NULL default '',
`address_2` varchar(20) default '',
`city` varchar(20) NOT NULL default '',
`state` char(2) NOT NULL default '',
`zip` varchar(11) NOT NULL default '',
`email` varchar(100) default '',
`notes` longtext,
`email?` int(11) NOT NULL default '0',
PRIMARY KEY (`parent_number`)
) TYPE=MyISAM;
INSERT INTO `adults` VALUES ........I had to cut this out.

I hope this helps someone help me. If it doesn't I'm going to go join a mysql
list next.

< Previous Next >