Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-09-05 00:15:32

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

database crash

Anyone have knowledge and experience of database crashes? I tried to re-name an article title and that appears to be what’s happened. Now I can’t access the txp interface, can’t access the database in phpMyAdmin, and my web site has almost disappeared – there’s no content there.

These are the error messages:

Warning: Incorrect key file for table './database/textpattern.MYI'; try to repair it update textpattern set Title = 'Conflict, Photography, The Imaginary, Symbolic, And Real', Body = 'Returning home from work......./home/sites/jameslomax.com/public_html/textpattern/lib/txplib_db.php on line 84 Warning: Table './database/textpattern' is marked as crashed and should be repaired describe `textpattern` in /home/sites/jameslomax.com/public_html/textpattern/lib/txplib_db.php on line 84 Warning: Cannot modify header information - headers already sent by (output started at /home/sites/jameslomax.com/public_html/textpattern/lib/txplib_db.php:84) in /home/sites/jameslomax.com/public_html/textpattern/lib/txplib_misc.php on line 1544 Warning: Cannot modify header information - headers already sent by (output started at /home/sites/jameslomax.com/public_html/textpattern/lib/txplib_db.php:84) in /home/sites/jameslomax.com/public_html/textpattern/lib/txplib_misc.php on line 1610 DB-Connect was succesful, but the textpattern-table was not found

Assuming this is correct – as I understand it, a table has crashed and needs to be repaired – but only my host can do this.

Is a database crash similar to a computer crash, and is ‘repairing’ it like rebooting a computer? And if so, does that mean in theory you shouldn’t lose any data, once its repaired?

And finally – does anyone have experience of re-naming article titles, and causing problems like this?

Offline

#2 2010-09-05 05:48:03

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: database crash

jameslomax wrote:

Anyone have knowledge and experience of database crashes? I tried to re-name an article title and that appears to be what’s happened. Now I can’t access the txp interface, can’t access the database in phpMyAdmin, and my web site has almost disappeared – there’s no content there.

If MySQL, or the MySQL databases, are down the PHP scripts that are dependant to the databases, like phpMyAdmin, won’t work. Infact phpmyadmin is just a PHP script like TXP, and has nothing to do with MySQL itself. It just is one of the most used and arguably the best database management scripts.

Assuming this is correct – as I understand it, a table has crashed and needs to be repaired – but only my host can do this.

If it’s limited shared hosting and you can’t control services, have shell access nor can’t install additional modules, then yes. Your best bet is contacting the host.

Is a database crash similar to a computer crash, and is ‘repairing’ it like rebooting a computer? And if so, does that mean in theory you shouldn’t lose any data, once its repaired?

No and yes. Stuff just happens to crash and like with your “computer crash” you may or may not lose important data. Might even happen that the tables can not be repaired at all.

Backups are important. If you don’t have copy of the content, the content is always vulnerable to data losses which may take place in any second.

And finally – does anyone have experience of re-naming article titles, and causing problems like this?

No, it doesn’t directly cause crashes :-) For example just using database causes overheat, just like using NTFS filesystem does. And when there is enough fragmention everything start to go shit.

Last edited by Gocom (2010-09-05 05:49:22)

Offline

#3 2010-09-05 09:10:30

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: database crash

jameslomax wrote:

Anyone have knowledge and experience of database crashes? I tried to re-name an article title and that appears to be what’s happened. Now I can’t access the txp interface, can’t access the database in phpMyAdmin, and my web site has almost disappeared – there’s no content there.

What exactly happens if you use PHPmyAdmin. Can you access other databases? Does it give an error the moment you fire up PHPmyAdmin? Which errors do you get while accessing your own database? Did you try repairing the database using PHPmyAdmin?
Contrary to Gocom, I don’t think MySQL is down, otherwise you would get a different error message. And a database is either there or isn’t there. It’s not down, although it can be damaged (sometimes beyond repair).

Assuming this is correct – as I understand it, a table has crashed and needs to be repaired – but only my host can do this.

If you have access to PHPmyAdmin, you should be able to repair the database yourself. Your host doesn’t have more options (unless they secretly backup your stuff).

Gocom wrote:

No, it doesn’t directly cause crashes :-) For example just using database causes overheat, just like using NTFS filesystem does. And when there is enough fragmention everything start to go shit.

You really should add more smileys :)

Offline

#4 2010-09-05 09:25:19

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

Re: database crash

Is fragmentation the issue, when a table has to be “repaired”?

I’ve noticed parts of the db resist being edited: many times I’ve tried to change the date of an article, and it won’t ‘stick’ – I have to repeat the command many times before it does. I think I’ve also noticed the same issue when changing article titles – so I wondered if parts of the txp db are less robust and stable than others.

Anyway….is your advice to assume the error message is correct, and ask my host to run a repair command on that table? Does it make sense, that all my data appears to be lost, I can’t access txp and I can’t access the db using phpMyAdmin, because of a crashed /database/textpattern table?

Can running a ‘repair’ command cause any more problems?

Offline

#5 2010-09-05 09:32:34

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

Re: database crash

ruud – yes I can access other databases I use on the server. In phpMyAdmin I see ‘information schema’ and ‘other_database_name’. When I click on the latter, I open up the txp database.

When I try to access the database for jameslomax.com all I see is ‘information schema’ – nothing more. However, my host is telling me they can see the database on the server.

I haven’t done anything – this is far too complicated for me.

However, I can access the sql query panel so I guess I could try running a ‘repair’ command on that table?

What EXACTLY would I need to enter there, to do that? And is there any risk that if I do that, it could damage the database even more?

Offline

#6 2010-09-05 09:52:55

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: database crash

jameslomax wrote:

Is fragmentation the issue, when a table has to be “repaired”?

Databases are best storing numbers. Storing big chunks of text, and constantly updating and deleting rows causes overheat which sometimes requires some optimization. But normally you never will have to run repair.

Plus, sometimes MySQL does miss writes or updates auto-increment wrong (usually because of some sort of interruption or bad coding) and such which also requires running automated repair command.

I’ve noticed parts of the db resist being edited: many times I’ve tried to change the date of an article, and it won’t ‘stick’ – I have to repeat the command many times before it does. I think I’ve also noticed the same issue when changing article titles – so I wondered if parts of the txp db are less robust and stable than others.

Are you sure it isn’t your browser’s cache? You have looked and checked the DB with phpMyAdmin or referreshed the cache? If that is true, there is something wrong how MySQL acts.

Does it make sense, that all my data appears to be lost, I can’t access txp and I can’t access the db using phpMyAdmin, because of a crashed /database/textpattern table?

What does phpMyAdmin show? What error? It doesn’t show the Textpattern’s database at all?

Can running a ‘repair’ command cause any more problems?

Yes it can (read: can) cause data losses. You should backup before you try to repair the tables, but that doesn’t seem to be the option.

Offline

#7 2010-09-05 10:00:28

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: database crash

ruud wrote:

You really should add more smileys :)

…and Textpattern forum needs image smileys, right? :)

Oh wait we can use !img.gif! :):):):):):):):)

Offline

#8 2010-09-05 10:12:25

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

Re: database crash

//What does phpMyAdmin show? What error? It doesn’t show the Textpattern’s database at all?//

It shows ‘information schema’ but not the name of the database. It doesn’t show any errors – I get the error message when I try to open txp.

So as far as I understand….yes, it doesn’t show the database at all (so what’s this ‘information schema’?)

Last edited by jameslomax (2010-09-05 10:12:55)

Offline

#9 2010-09-05 10:13:29

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: database crash

jameslomax wrote:

It shows ‘information schema’ but not the name of the database. It doesn’t show any errors – I get the error message when I try to open txp.

Are you logged in with the correct user? The actual database needs to be accessable before you can try to repair a table.

Anyhow, if you have shell access you can use mysqlcheck:

mysqlcheck -u root -p --auto-repair --check --optimize --all-databases

With phpMyadmin you can do:

repair table textpattern

After you have connected to the database.

So as far as I understand….yes, it doesn’t show the database at all (so what’s this ‘information schema’?)

Information schema is MySQL’s own database which stored metadata for the databases.

Offline

#10 2010-09-05 10:16:14

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

Re: database crash

Here it is again, when I try to open txp:

Warning: Table './database/textpattern' is marked as crashed and should be repaired describe `textpattern` in /home/sites/jameslomax.com/public_html/textpattern/lib/txplib_db.php on line 84 Warning: Cannot modify header information - headers already sent by (output started at /home/sites/jameslomax.com/public_html/textpattern/lib/txplib_db.php:84) in /home/sites/jameslomax.com/public_html/textpattern/lib/txplib_misc.php on line 1544 Warning: Cannot modify header information - headers already sent by (output started at /home/sites/jameslomax.com/public_html/textpattern/lib/txplib_db.php:84) in /home/sites/jameslomax.com/public_html/textpattern/lib/txplib_misc.php on line 1610 DB-Connect was succesful, but the textpattern-table was not found.

Offline

#11 2010-09-05 10:18:35

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: database crash

jameslomax wrote:

Here it is again, when I try to open txp:

No, I mean the phpMyAdmin. If you are trying to use phpMyAdmin you need to login with a user that has privs to the textpattern’s database.

You can get login details (username and password) from Textpattern’s config file, /textpattern/config.php.

Offline

#12 2010-09-05 14:34:42

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

Re: database crash

“If you are trying to use phpMyAdmin you need to login with a user that has privs to the textpattern’s database”

I’ve done that – but phpMyAdmin can’t seem to find it. All it shows is the ‘information schema’.

However, my host is assuring me the db does exist.

So either my host will run “repair table textpattern” or I will – and that’s the logical next step to take here?

In theory – could this solve the problem, just by doing it?

Last edited by jameslomax (2010-09-05 14:37:11)

Offline

Board footer

Powered by FluxBB