Discussion:
Old Zoneminder problem
(too old to reply)
Davey
2024-01-08 15:31:00 UTC
Permalink
I have an old Dell PC, that I have used for many years to run a
Zoneminder installation. The PC runs Ubuntu 8.04LTS, Zoneminder is
v1.22.3.
It has worked pretty flawlessly for years, but suddenly I have been
getting the dreaded "Table './zm/Frames' is marked as crashed and
should be repaired" error message when trying to access any records. I
have gone round and round in the Zoneminder Forums, in which this is
frequently discussed, but I cannot get the:
<mysqlcheck --all-databases --auto-repair>
instruction to work, which is generally considered to be the correct
thing to do. If I try to navigate to:
</var/lib/mysql/zm>, as instructed, I get 'Permission denied', and I
cannot get beyond this. 'Sudo' doesn't work.
I feel that I am close to getting this working again, but I can't cross
this final hurdle.
Any help welcome.
--
Davey.
Simon
2024-01-08 16:12:12 UTC
Permalink
Post by Davey
I have an old Dell PC, that I have used for many years to run a
Zoneminder installation. The PC runs Ubuntu 8.04LTS, Zoneminder is
v1.22.3.
It has worked pretty flawlessly for years, but suddenly I have been
getting the dreaded "Table './zm/Frames' is marked as crashed and
should be repaired" error message when trying to access any records. I
have gone round and round in the Zoneminder Forums, in which this is
<mysqlcheck --all-databases --auto-repair>
instruction to work, which is generally considered to be the correct
</var/lib/mysql/zm>, as instructed, I get 'Permission denied', and I
cannot get beyond this. 'Sudo' doesn't work.
I feel that I am close to getting this working again, but I can't cross
this final hurdle.
Any help welcome.
What is the error when using the sudo command?
--
Simon

RLU: 222126
Davey
2024-01-08 16:51:53 UTC
Permalink
On Mon, 8 Jan 2024 16:12:12 -0000 (UTC)
Post by Simon
Post by Davey
I have an old Dell PC, that I have used for many years to run a
Zoneminder installation. The PC runs Ubuntu 8.04LTS, Zoneminder is
v1.22.3.
It has worked pretty flawlessly for years, but suddenly I have been
getting the dreaded "Table './zm/Frames' is marked as crashed and
should be repaired" error message when trying to access any
records. I have gone round and round in the Zoneminder Forums, in
<mysqlcheck --all-databases --auto-repair>
instruction to work, which is generally considered to be the correct
</var/lib/mysql/zm>, as instructed, I get 'Permission denied', and I
cannot get beyond this. 'Sudo' doesn't work.
I feel that I am close to getting this working again, but I can't
cross this final hurdle.
Any help welcome.
What is the error when using the sudo command?
sudo: cd: command not found
--
Davey.
Simon
2024-01-08 17:47:52 UTC
Permalink
Post by Davey
On Mon, 8 Jan 2024 16:12:12 -0000 (UTC)
Post by Simon
Post by Davey
I have an old Dell PC, that I have used for many years to run a
Zoneminder installation. The PC runs Ubuntu 8.04LTS, Zoneminder is
v1.22.3.
It has worked pretty flawlessly for years, but suddenly I have been
getting the dreaded "Table './zm/Frames' is marked as crashed and
should be repaired" error message when trying to access any
records. I have gone round and round in the Zoneminder Forums, in
<mysqlcheck --all-databases --auto-repair>
instruction to work, which is generally considered to be the correct
</var/lib/mysql/zm>, as instructed, I get 'Permission denied', and I
cannot get beyond this. 'Sudo' doesn't work.
I feel that I am close to getting this working again, but I can't
cross this final hurdle.
Any help welcome.
What is the error when using the sudo command?
sudo: cd: command not found
So try sudo su

and then run the command from there.
--
Simon

RLU: 222126
Davey
2024-01-08 19:12:36 UTC
Permalink
On Mon, 8 Jan 2024 17:47:52 -0000 (UTC)
Post by Simon
Post by Davey
On Mon, 8 Jan 2024 16:12:12 -0000 (UTC)
Post by Simon
Post by Davey
I have an old Dell PC, that I have used for many years to run a
Zoneminder installation. The PC runs Ubuntu 8.04LTS, Zoneminder
is v1.22.3.
It has worked pretty flawlessly for years, but suddenly I have
been getting the dreaded "Table './zm/Frames' is marked as
crashed and should be repaired" error message when trying to
access any records. I have gone round and round in the
Zoneminder Forums, in which this is frequently discussed, but I
<mysqlcheck --all-databases --auto-repair>
instruction to work, which is generally considered to be the
</var/lib/mysql/zm>, as instructed, I get 'Permission denied', and I
cannot get beyond this. 'Sudo' doesn't work.
I feel that I am close to getting this working again, but I can't
cross this final hurdle.
Any help welcome.
What is the error when using the sudo command?
sudo: cd: command not found
So try sudo su
and then run the command from there.
Well, it let me get into root, and all the way to /var/lib/mysql/zm.
So I entered the mysqlcheck command:
***@david-desktop:/var/lib/mysql/zm# mysqlcheck --all-databases
--auto-repair
mysqlcheck: Got error: 1045: Access denied for user
'root'@'localhost' (using password: NO) when trying to connect.

Grrr.
--
Davey.
Simon
2024-01-08 20:06:53 UTC
Permalink
Post by Davey
On Mon, 8 Jan 2024 17:47:52 -0000 (UTC)
Post by Simon
Post by Davey
On Mon, 8 Jan 2024 16:12:12 -0000 (UTC)
Post by Simon
Post by Davey
I have an old Dell PC, that I have used for many years to run a
Zoneminder installation. The PC runs Ubuntu 8.04LTS, Zoneminder
is v1.22.3.
It has worked pretty flawlessly for years, but suddenly I have
been getting the dreaded "Table './zm/Frames' is marked as
crashed and should be repaired" error message when trying to
access any records. I have gone round and round in the
Zoneminder Forums, in which this is frequently discussed, but I
<mysqlcheck --all-databases --auto-repair>
instruction to work, which is generally considered to be the
</var/lib/mysql/zm>, as instructed, I get 'Permission denied', and I
cannot get beyond this. 'Sudo' doesn't work.
I feel that I am close to getting this working again, but I can't
cross this final hurdle.
Any help welcome.
What is the error when using the sudo command?
sudo: cd: command not found
So try sudo su
and then run the command from there.
Well, it let me get into root, and all the way to /var/lib/mysql/zm.
--auto-repair
mysqlcheck: Got error: 1045: Access denied for user
Grrr.
You need to run as a user with mysql access, eg. mysql -u root -p and
give a new password.
--
Simon

RLU: 222126
Davey
2024-01-09 11:23:35 UTC
Permalink
On Mon, 8 Jan 2024 20:06:53 -0000 (UTC)
Post by Simon
Post by Davey
On Mon, 8 Jan 2024 17:47:52 -0000 (UTC)
Post by Simon
Post by Davey
On Mon, 8 Jan 2024 16:12:12 -0000 (UTC)
Post by Simon
Post by Davey
I have an old Dell PC, that I have used for many years to run
a Zoneminder installation. The PC runs Ubuntu 8.04LTS,
Zoneminder is v1.22.3.
It has worked pretty flawlessly for years, but suddenly I have
been getting the dreaded "Table './zm/Frames' is marked as
crashed and should be repaired" error message when trying to
access any records. I have gone round and round in the
Zoneminder Forums, in which this is frequently discussed, but
<mysqlcheck --all-databases --auto-repair>
instruction to work, which is generally considered to be the
</var/lib/mysql/zm>, as instructed, I get 'Permission denied', and I
cannot get beyond this. 'Sudo' doesn't work.
I feel that I am close to getting this working again, but I
can't cross this final hurdle.
Any help welcome.
What is the error when using the sudo command?
sudo: cd: command not found
So try sudo su
and then run the command from there.
Well, it let me get into root, and all the way to /var/lib/mysql/zm.
--auto-repair
mysqlcheck: Got error: 1045: Access denied for user
Grrr.
You need to run as a user with mysql access, eg. mysql -u root -p and
give a new password.
It let me get into mysql, thank you very much. And I have entered the
database autorepair command, and it is sitting there doing something,
although I don't know what. Hopefully, it will eventually decide that
it has worked. All fingers crossed. The cursor flashes for a while,
then goes still, then flashes again.
--
Davey.
Davey
2024-01-09 13:52:43 UTC
Permalink
On Tue, 9 Jan 2024 11:23:35 +0000
Post by Davey
On Mon, 8 Jan 2024 20:06:53 -0000 (UTC)
Post by Simon
Post by Davey
On Mon, 8 Jan 2024 17:47:52 -0000 (UTC)
Post by Simon
Post by Davey
On Mon, 8 Jan 2024 16:12:12 -0000 (UTC)
Post by Simon
Post by Davey
I have an old Dell PC, that I have used for many years to
run a Zoneminder installation. The PC runs Ubuntu 8.04LTS,
Zoneminder is v1.22.3.
It has worked pretty flawlessly for years, but suddenly I
have been getting the dreaded "Table './zm/Frames' is
marked as crashed and should be repaired" error message
when trying to access any records. I have gone round and
round in the Zoneminder Forums, in which this is frequently
<mysqlcheck --all-databases --auto-repair>
instruction to work, which is generally considered to be the
</var/lib/mysql/zm>, as instructed, I get 'Permission
denied', and I
cannot get beyond this. 'Sudo' doesn't work.
I feel that I am close to getting this working again, but I
can't cross this final hurdle.
Any help welcome.
What is the error when using the sudo command?
sudo: cd: command not found
So try sudo su
and then run the command from there.
Well, it let me get into root, and all the way
--auto-repair
mysqlcheck: Got error: 1045: Access denied for user
Grrr.
You need to run as a user with mysql access, eg. mysql -u root -p
and give a new password.
It let me get into mysql, thank you very much. And I have entered the
database autorepair command, and it is sitting there doing something,
although I don't know what. Hopefully, it will eventually decide that
it has worked. All fingers crossed. The cursor flashes for a while,
then goes still, then flashes again.
After more than 2 hours, there was no change, so I terminated it. It
complained about a broken pipe, so maybe it was still working. I'll try
it again later, maybe with a verbose option, to see if that does
anything.
--
Davey.
Davey
2024-01-09 19:08:43 UTC
Permalink
On Tue, 9 Jan 2024 13:52:43 +0000
Post by Davey
On Tue, 9 Jan 2024 11:23:35 +0000
Post by Davey
On Mon, 8 Jan 2024 20:06:53 -0000 (UTC)
Post by Simon
Post by Davey
On Mon, 8 Jan 2024 17:47:52 -0000 (UTC)
Post by Simon
Post by Davey
On Mon, 8 Jan 2024 16:12:12 -0000 (UTC)
Post by Simon
Post by Davey
I have an old Dell PC, that I have used for many years to
run a Zoneminder installation. The PC runs Ubuntu 8.04LTS,
Zoneminder is v1.22.3.
It has worked pretty flawlessly for years, but suddenly I
have been getting the dreaded "Table './zm/Frames' is
marked as crashed and should be repaired" error message
when trying to access any records. I have gone round and
round in the Zoneminder Forums, in which this is
<mysqlcheck --all-databases --auto-repair>
instruction to work, which is generally considered to be
</var/lib/mysql/zm>, as instructed, I get 'Permission denied', and I
cannot get beyond this. 'Sudo' doesn't work.
I feel that I am close to getting this working again, but
I can't cross this final hurdle.
Any help welcome.
What is the error when using the sudo command?
sudo: cd: command not found
So try sudo su
and then run the command from there.
Well, it let me get into root, and all the way
--auto-repair
mysqlcheck: Got error: 1045: Access denied for user
Grrr.
You need to run as a user with mysql access, eg. mysql -u root -p
and give a new password.
It let me get into mysql, thank you very much. And I have entered
the database autorepair command, and it is sitting there doing
something, although I don't know what. Hopefully, it will
eventually decide that it has worked. All fingers crossed. The
cursor flashes for a while, then goes still, then flashes again.
After more than 2 hours, there was no change, so I terminated it. It
complained about a broken pipe, so maybe it was still working. I'll
try it again later, maybe with a verbose option, to see if that does
anything.
Well, that seems to be stuck, however ling I leave it. I tried the
mysqlcheck instruction with --verbose on the end, but it said nothing.
it seems to be doing something, but I don't know what, it's not telling
me, it never ends, but it complains 'aborted' if I stop it.
Most puzzling.
I think I'll sleep on it, and try again tomorrow.
--
Davey.
Davey
2024-01-10 15:32:05 UTC
Permalink
On Tue, 9 Jan 2024 19:08:43 +0000
Post by Davey
On Tue, 9 Jan 2024 13:52:43 +0000
Post by Davey
On Tue, 9 Jan 2024 11:23:35 +0000
Post by Davey
On Mon, 8 Jan 2024 20:06:53 -0000 (UTC)
Post by Simon
Post by Davey
On Mon, 8 Jan 2024 17:47:52 -0000 (UTC)
Post by Simon
Post by Davey
On Mon, 8 Jan 2024 16:12:12 -0000 (UTC)
Post by Simon
Post by Davey
I have an old Dell PC, that I have used for many years
to run a Zoneminder installation. The PC runs Ubuntu
8.04LTS, Zoneminder is v1.22.3.
It has worked pretty flawlessly for years, but suddenly
I have been getting the dreaded "Table './zm/Frames' is
marked as crashed and should be repaired" error message
when trying to access any records. I have gone round and
round in the Zoneminder Forums, in which this is
<mysqlcheck --all-databases --auto-repair>
instruction to work, which is generally considered to be
</var/lib/mysql/zm>, as instructed, I get 'Permission
denied', and I
cannot get beyond this. 'Sudo' doesn't work.
I feel that I am close to getting this working again,
but I can't cross this final hurdle.
Any help welcome.
What is the error when using the sudo command?
sudo: cd: command not found
So try sudo su
and then run the command from there.
Well, it let me get into root, and all the way
--all-databases --auto-repair
mysqlcheck: Got error: 1045: Access denied for user
connect.
Grrr.
You need to run as a user with mysql access, eg. mysql -u root
-p and give a new password.
It let me get into mysql, thank you very much. And I have entered
the database autorepair command, and it is sitting there doing
something, although I don't know what. Hopefully, it will
eventually decide that it has worked. All fingers crossed. The
cursor flashes for a while, then goes still, then flashes again.
After more than 2 hours, there was no change, so I terminated it. It
complained about a broken pipe, so maybe it was still working. I'll
try it again later, maybe with a verbose option, to see if that does
anything.
Well, that seems to be stuck, however ling I leave it. I tried the
mysqlcheck instruction with --verbose on the end, but it said nothing.
it seems to be doing something, but I don't know what, it's not
telling me, it never ends, but it complains 'aborted' if I stop it.
Most puzzling.
I think I'll sleep on it, and try again tomorrow.
How can I tell if it's actually doing anything? I started the same
process this morning, and again it seems to start the mysqlcheck
process without complaint. There is a '>' followed by a flashing cursor,
which sometimes stops flashing, and then starts again. If I stop it with
Cntrl-C, it tells me 'aborted'. But there is no other sign of progress,
it doesn't argue with the --verbose option, but it doesn't report
anything either. I am most puzzled. I'll let it run for 24 hours, that
really should be enough, even for a slow PC.

Again, any help most welcome.
--
Davey.
Theo
2024-01-10 18:03:11 UTC
Permalink
Post by Davey
How can I tell if it's actually doing anything? I started the same
process this morning, and again it seems to start the mysqlcheck
process without complaint. There is a '>' followed by a flashing cursor,
which sometimes stops flashing, and then starts again. If I stop it with
Cntrl-C, it tells me 'aborted'. But there is no other sign of progress,
it doesn't argue with the --verbose option, but it doesn't report
anything either. I am most puzzled. I'll let it run for 24 hours, that
really should be enough, even for a slow PC.
'top' will tell you if it's using CPU.

'strace' will tell you what syscalls it's making, best logged to a file
eg:

strace -f -tt -o file.log mysqladmin --whatever

-f logs all the child processes as well, and -tt timestamps each one with
microseconds.

Interpreting the strace log is a bit of a skill, but just looking at the
timestamps will tell you if it's in a loop doing something, or stuck waiting
for something which never happens.


However I suspect your bigger problem will be that you need to install
strace and the package repos are long gone. It seems like the archives are
at:

http://old-releases.ubuntu.com/ubuntu/

and you can replace 'archive.ubuntu.com' with 'old-releases.ubuntu.com' in
your /etc/apt/sources.list and then apt-get update to fetch them.

Theo
Davey
2024-01-10 23:42:10 UTC
Permalink
On 10 Jan 2024 18:03:11 +0000 (GMT)
Post by Theo
Post by Davey
How can I tell if it's actually doing anything? I started the same
process this morning, and again it seems to start the mysqlcheck
process without complaint. There is a '>' followed by a flashing
cursor, which sometimes stops flashing, and then starts again. If I
stop it with Cntrl-C, it tells me 'aborted'. But there is no other
sign of progress, it doesn't argue with the --verbose option, but
it doesn't report anything either. I am most puzzled. I'll let it
run for 24 hours, that really should be enough, even for a slow
PC.
'top' will tell you if it's using CPU.
'strace' will tell you what syscalls it's making, best logged to a
strace -f -tt -o file.log mysqladmin --whatever
-f logs all the child processes as well, and -tt timestamps each one
with microseconds.
Interpreting the strace log is a bit of a skill, but just looking at
the timestamps will tell you if it's in a loop doing something, or
stuck waiting for something which never happens.
However I suspect your bigger problem will be that you need to install
strace and the package repos are long gone. It seems like the
http://old-releases.ubuntu.com/ubuntu/
and you can replace 'archive.ubuntu.com' with
'old-releases.ubuntu.com' in your /etc/apt/sources.list and then
apt-get update to fetch them.
Theo
Thanks. I'll start with 'top', and see what that tells me. This is
getting more and more frustrating!
Thanks for the help,
--
Davey.
Simon
2024-01-11 08:42:38 UTC
Permalink
Post by Davey
On Tue, 9 Jan 2024 19:08:43 +0000
Post by Davey
On Tue, 9 Jan 2024 13:52:43 +0000
Post by Davey
On Tue, 9 Jan 2024 11:23:35 +0000
Post by Davey
On Mon, 8 Jan 2024 20:06:53 -0000 (UTC)
Post by Simon
Post by Davey
On Mon, 8 Jan 2024 17:47:52 -0000 (UTC)
Post by Simon
Post by Davey
On Mon, 8 Jan 2024 16:12:12 -0000 (UTC)
Post by Simon
Post by Davey
I have an old Dell PC, that I have used for many years
to run a Zoneminder installation. The PC runs Ubuntu
8.04LTS, Zoneminder is v1.22.3.
It has worked pretty flawlessly for years, but suddenly
I have been getting the dreaded "Table './zm/Frames' is
marked as crashed and should be repaired" error message
when trying to access any records. I have gone round and
round in the Zoneminder Forums, in which this is
<mysqlcheck --all-databases --auto-repair>
instruction to work, which is generally considered to be
</var/lib/mysql/zm>, as instructed, I get 'Permission
denied', and I
cannot get beyond this. 'Sudo' doesn't work.
I feel that I am close to getting this working again,
but I can't cross this final hurdle.
Any help welcome.
What is the error when using the sudo command?
sudo: cd: command not found
So try sudo su
and then run the command from there.
Well, it let me get into root, and all the way
--all-databases --auto-repair
mysqlcheck: Got error: 1045: Access denied for user
Grrr.
You need to run as a user with mysql access, eg. mysql -u root
-p and give a new password.
It let me get into mysql, thank you very much. And I have entered
the database autorepair command, and it is sitting there doing
something, although I don't know what. Hopefully, it will
eventually decide that it has worked. All fingers crossed. The
cursor flashes for a while, then goes still, then flashes again.
After more than 2 hours, there was no change, so I terminated it. It
complained about a broken pipe, so maybe it was still working. I'll
try it again later, maybe with a verbose option, to see if that does
anything.
Well, that seems to be stuck, however ling I leave it. I tried the
mysqlcheck instruction with --verbose on the end, but it said nothing.
it seems to be doing something, but I don't know what, it's not
telling me, it never ends, but it complains 'aborted' if I stop it.
Most puzzling.
I think I'll sleep on it, and try again tomorrow.
How can I tell if it's actually doing anything? I started the same
process this morning, and again it seems to start the mysqlcheck
process without complaint. There is a '>' followed by a flashing cursor,
which sometimes stops flashing, and then starts again. If I stop it with
Cntrl-C, it tells me 'aborted'. But there is no other sign of progress,
it doesn't argue with the --verbose option, but it doesn't report
anything either. I am most puzzled. I'll let it run for 24 hours, that
really should be enough, even for a slow PC.
Again, any help most welcome.
Usually the ">" denotes it is waiting for further input, I would
verify the command entered is correct and complete.

hth
--
Simon

RLU: 222126
Theo
2024-01-11 09:48:38 UTC
Permalink
Post by Simon
Usually the ">" denotes it is waiting for further input, I would
verify the command entered is correct and complete.
Davey, can you paste the exact command being entered and its output here?
(you can blank out any passwords that may be visible)

mysqladmin does use > as a prompt to enter commands. In this example
somebody typed 'mysqlcheck' at the mysqladmin prompt not at their command
line:

https://dba.stackexchange.com/questions/267788/how-to-check-and-repair-mysql-database-using-mysqlcheck

Simon may be right in that you're staring at a prompt and expecting it to do
something, while it's expecting *you* to do something.

Theo
Davey
2024-01-11 10:04:01 UTC
Permalink
On 11 Jan 2024 09:48:38 +0000 (GMT)
Post by Theo
Post by Simon
Usually the ">" denotes it is waiting for further input, I would
verify the command entered is correct and complete.
Davey, can you paste the exact command being entered and its output
here? (you can blank out any passwords that may be visible)
mysqladmin does use > as a prompt to enter commands. In this example
somebody typed 'mysqlcheck' at the mysqladmin prompt not at their
https://dba.stackexchange.com/questions/267788/how-to-check-and-repair-mysql-database-using-mysqlcheck
Simon may be right in that you're staring at a prompt and expecting
it to do something, while it's expecting *you* to do something.
Theo
Yes, indeed. Some useful information there, I'll make some more
attempts. Maybe I'm close........
--
Davey.
Davey
2024-01-11 11:42:30 UTC
Permalink
On 11 Jan 2024 09:48:38 +0000 (GMT)
Post by Theo
Post by Simon
Usually the ">" denotes it is waiting for further input, I would
verify the command entered is correct and complete.
Davey, can you paste the exact command being entered and its output
here? (you can blank out any passwords that may be visible)
mysqladmin does use > as a prompt to enter commands. In this example
somebody typed 'mysqlcheck' at the mysqladmin prompt not at their
https://dba.stackexchange.com/questions/267788/how-to-check-and-repair-mysql-database-using-mysqlcheck
Simon may be right in that you're staring at a prompt and expecting
it to do something, while it's expecting *you* to do something.
Theo
IT WORKS!!

I followed the link, and it put me on the right path.
I did the same procedure as before, sudo su, cd to /var/lib/mysql/zm,
then entered the instruction:
mysqlcheck -c -u -root -p --all-databases --auto-repair
It then asked for the password, at last, and on entering it, it did the
check procedure!. Despite mysql being specifically for use while the
database is running, it complained that two tables had not been shut
down, but continued on anyway:
Extract:
zm.Stats
warning : Table is marked as crashed
warning : 5 clients are using or haven't closed the table properly
error : Found 158665 keys of 159586
error : Corrupt
zm.TriggersX10 OK

After it had finished, I Stopped Zoneminder running, and repeated the
process. And everything came back as OK. A final check, I brought up a
camera, initiated a Forced Alarm, and it finally worked.
Many, many thanks to those who have helped me.
--
Davey.
Adrian Caspersz
2024-01-13 09:17:33 UTC
Permalink
Post by Davey
After it had finished, I Stopped Zoneminder running, and repeated the
process. And everything came back as OK. A final check, I brought up a
camera, initiated a Forced Alarm, and it finally worked.
Many, many thanks to those who have helped me.
Cool stuff :)


Time now to find how to backup that application, save database
passwords, migrate the whole thing to a newer platform, thrown out a
power inefficient PC.

Hope you've blocked internet access for Ubuntu 8.04LTS, that is a bit
old....
--
Adrian C
Davey
2024-01-13 09:58:42 UTC
Permalink
On Sat, 13 Jan 2024 09:17:33 +0000
Post by Adrian Caspersz
Hope you've blocked internet access for Ubuntu 8.04LTS, that is a bit
old....
That PC hasn't talked to the internet for years.
--
Davey.
Davey
2024-01-11 10:02:41 UTC
Permalink
On Thu, 11 Jan 2024 08:42:38 -0000 (UTC)
Post by Simon
Post by Davey
On Tue, 9 Jan 2024 19:08:43 +0000
Post by Davey
On Tue, 9 Jan 2024 13:52:43 +0000
Post by Davey
On Tue, 9 Jan 2024 11:23:35 +0000
Post by Davey
On Mon, 8 Jan 2024 20:06:53 -0000 (UTC)
Post by Simon
Post by Davey
On Mon, 8 Jan 2024 17:47:52 -0000 (UTC)
Post by Simon
Post by Davey
On Mon, 8 Jan 2024 16:12:12 -0000 (UTC)
Post by Simon
Post by Davey
I have an old Dell PC, that I have used for many
years to run a Zoneminder installation. The PC runs
Ubuntu 8.04LTS, Zoneminder is v1.22.3.
It has worked pretty flawlessly for years, but
suddenly I have been getting the dreaded "Table
'./zm/Frames' is marked as crashed and should be
repaired" error message when trying to access any
records. I have gone round and round in the
Zoneminder Forums, in which this is frequently
<mysqlcheck --all-databases --auto-repair>
instruction to work, which is generally considered
to be the correct thing to do. If I try to navigate
</var/lib/mysql/zm>, as instructed, I get 'Permission
denied', and I
cannot get beyond this. 'Sudo' doesn't work.
I feel that I am close to getting this working again,
but I can't cross this final hurdle.
Any help welcome.
What is the error when using the sudo command?
sudo: cd: command not found
So try sudo su
and then run the command from there.
Well, it let me get into root, and all the way
--all-databases --auto-repair
mysqlcheck: Got error: 1045: Access denied for user
Grrr.
You need to run as a user with mysql access, eg. mysql -u
root -p and give a new password.
It let me get into mysql, thank you very much. And I have
entered the database autorepair command, and it is sitting
there doing something, although I don't know what. Hopefully,
it will eventually decide that it has worked. All fingers
crossed. The cursor flashes for a while, then goes still, then
flashes again.
After more than 2 hours, there was no change, so I terminated
it. It complained about a broken pipe, so maybe it was still
working. I'll try it again later, maybe with a verbose option,
to see if that does anything.
Well, that seems to be stuck, however ling I leave it. I tried the
mysqlcheck instruction with --verbose on the end, but it said
nothing. it seems to be doing something, but I don't know what,
it's not telling me, it never ends, but it complains 'aborted' if
I stop it. Most puzzling.
I think I'll sleep on it, and try again tomorrow.
How can I tell if it's actually doing anything? I started the same
process this morning, and again it seems to start the mysqlcheck
process without complaint. There is a '>' followed by a flashing
cursor, which sometimes stops flashing, and then starts again. If I
stop it with Cntrl-C, it tells me 'aborted'. But there is no other
sign of progress, it doesn't argue with the --verbose option, but
it doesn't report anything either. I am most puzzled. I'll let it
run for 24 hours, that really should be enough, even for a slow PC.
Again, any help most welcome.
Usually the ">" denotes it is waiting for further input, I would
verify the command entered is correct and complete.
hth
That matches what I am seeing. I just wish it would tell me what it
needs.
--
Davey.
Andy Burns
2024-01-11 11:14:45 UTC
Permalink
Post by Davey
Post by Simon
Usually the ">" denotes it is waiting for further input, I would
verify the command entered is correct and complete.
That matches what I am seeing. I just wish it would tell me what it
needs.
mismatched quotes?
Richmond
2024-01-08 18:16:42 UTC
Permalink
Post by Davey
On Mon, 8 Jan 2024 16:12:12 -0000 (UTC)
Post by Simon
Post by Davey
I have an old Dell PC, that I have used for many years to run a
Zoneminder installation. The PC runs Ubuntu 8.04LTS, Zoneminder is
v1.22.3.
It has worked pretty flawlessly for years, but suddenly I have been
getting the dreaded "Table './zm/Frames' is marked as crashed and
should be repaired" error message when trying to access any
records. I have gone round and round in the Zoneminder Forums, in
<mysqlcheck --all-databases --auto-repair>
instruction to work, which is generally considered to be the correct
</var/lib/mysql/zm>, as instructed, I get 'Permission denied', and I
cannot get beyond this. 'Sudo' doesn't work.
I feel that I am close to getting this working again, but I can't
cross this final hurdle.
Any help welcome.
What is the error when using the sudo command?
sudo: cd: command not found
On Debian, sudo is a package, and possibly not installed by default.

i A sudo - Provide limited super user privileges to specific users

So you could try apt install sudo, but you need to be root for that. :)

su - root

To switch to the root user.
Davey
2024-01-08 19:04:34 UTC
Permalink
On Mon, 08 Jan 2024 18:16:42 +0000
Post by Richmond
Post by Davey
On Mon, 8 Jan 2024 16:12:12 -0000 (UTC)
Post by Simon
Post by Davey
I have an old Dell PC, that I have used for many years to run a
Zoneminder installation. The PC runs Ubuntu 8.04LTS, Zoneminder
is v1.22.3.
It has worked pretty flawlessly for years, but suddenly I have
been getting the dreaded "Table './zm/Frames' is marked as
crashed and should be repaired" error message when trying to
access any records. I have gone round and round in the
Zoneminder Forums, in which this is frequently discussed, but I
<mysqlcheck --all-databases --auto-repair>
instruction to work, which is generally considered to be the
</var/lib/mysql/zm>, as instructed, I get 'Permission denied', and I
cannot get beyond this. 'Sudo' doesn't work.
I feel that I am close to getting this working again, but I can't
cross this final hurdle.
Any help welcome.
What is the error when using the sudo command?
sudo: cd: command not found
On Debian, sudo is a package, and possibly not installed by default.
i A sudo - Provide limited super user privileges to specific users
So you could try apt install sudo, but you need to be root for
that. :)
su - root
To switch to the root user.
Hmm. I've been using sudo for about 15 years, but I'll try anything.
--
Davey.
Theo
2024-01-08 20:29:35 UTC
Permalink
Post by Richmond
Post by Davey
On Mon, 8 Jan 2024 16:12:12 -0000 (UTC)
Post by Simon
Post by Davey
I have an old Dell PC, that I have used for many years to run a
Zoneminder installation. The PC runs Ubuntu 8.04LTS, Zoneminder is
v1.22.3.
It has worked pretty flawlessly for years, but suddenly I have been
getting the dreaded "Table './zm/Frames' is marked as crashed and
should be repaired" error message when trying to access any
records. I have gone round and round in the Zoneminder Forums, in
<mysqlcheck --all-databases --auto-repair>
instruction to work, which is generally considered to be the correct
</var/lib/mysql/zm>, as instructed, I get 'Permission denied', and I
cannot get beyond this. 'Sudo' doesn't work.
I feel that I am close to getting this working again, but I can't
cross this final hurdle.
Any help welcome.
What is the error when using the sudo command?
sudo: cd: command not found
On Debian, sudo is a package, and possibly not installed by default.
i A sudo - Provide limited super user privileges to specific users
So you could try apt install sudo, but you need to be root for that. :)
su - root
To switch to the root user.
sudo is installed, but as it says 'cd' isn't a command, it's a shell
builtin. sudo can only run executables that live on the filesystem.

ie you could run:
$ sudo bash
# cd whatever
# ./run-me.sh

or
$ cd whatever
$ sudo ./run-me.sh

but you can't
$ sudo cd whatever

Even if there was a 'cd' executable, it would change the directory in that
process and then exit, so it wouldn't affect anything in the caller.

You can use the -i flag to force sudo to launch a login shell before running
the command, so it doesn't complain:

***@machine:~$ sudo -i cd /
***@machine:~$

but as you can see it doesn't do anything: it changes directory in the shell
launched by sudo and then promptly exits that shell, effectively doing
nothing.

Theo
Loading...