Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: jameswilson on February 15, 2010, 01:59:06 AM
-
hi all
I have been having major issues with 2 sme boxes running as virtual machines. I dont beleive them to be sme issues however, but beacuse they are crashing from time to time i get databases errors.
not usually a problem as mysqlcheck sorts them out.
But on one of the boxes the command
mysqlcheck --all-databases
immediatly returns to prompt. ie nothing seems to happen. no errors nothing.
I can access mysql from the command line but im kind of scared to mess around too much.
any suggestions?
-
I can access mysql from the command line but im kind of scared to mess around too much.
How? By only typing mysql or do you need to add credentials?
A normal run of mysqlcheck --all-databases should check all databases on SME Server, did you perhaps modify the password for MySQL root user?
-
no i didnt modify the password, i know that is a big no no
if i type "mysql" i dont have to provide any additional auth to login.
I presume something has become damaged from the regular crashes.
-
no i didnt modify the password, i know that is a big no no
if i type "mysql" i dont have to provide any additional auth to login.
I presume something has become damaged from the regular crashes.
Strange... and there is no ouptut at all? Not even something about an error message?
Did you already try:
mysqlcheck --all-databases --verbose --analyze --force
If that does not work you could try checking per database if you know which databases are on the system by replacing --all-databases
with --database dbname
-
output from what i would normally
[root@bart ~]# mysqlcheck --all-databases
[root@bart ~]#
using your suggestion and output
[root@bart ~]# mysqlcheck --all-databases --verbose --analyze --force
# Connecting to localhost...
# Disconnecting from localhost...
[root@bart ~]#
does that help?
-
does that help?
No, not really... what is the output of:
ls -la /var/lib/mysql/
-
drwxr-xr-x 18 mysql mysql 4096 Feb 15 00:40 .
drwxr-xr-x 24 root root 4096 Oct 2 09:07 ..
drwx------ 2 mysql mysql 4096 Nov 27 00:03 db1
drwx------ 2 mysql mysql 36864 Feb 6 11:59 db2
drwx------ 2 mysql mysql 4096 Feb 6 14:09 horde
drwx------ 2 mysql mysql 4096 Feb 6 11:59 db3
drwx------ 2 mysql mysql 4096 Feb 6 14:09 mysql
srwxrwxrwx 1 mysql mysql 0 Feb 15 00:40 mysql.sock
drwx------ 2 mysql mysql 4096 Feb 10 08:50 db4
drwx------ 2 mysql mysql 4096 Nov 27 00:03 db5
drwx------ 2 mysql mysql 4096 Nov 27 00:03 db6
drwxr-x--- 2 mysql mysql 4096 Feb 14 23:37 db7
drwx------ 2 mysql mysql 4096 Nov 15 20:08 db8
drwx------ 2 mysql mysql 4096 Nov 27 00:04 db9
drwx------ 2 mysql mysql 4096 May 24 2009 test
drwx------ 2 mysql mysql 4096 Nov 27 00:04 db10
drwx------ 2 mysql mysql 49152 Nov 27 00:04 db11
drwx------ 2 mysql mysql 4096 Nov 27 00:04 db12
drwx------ 2 mysql mysql 4096 Nov 27 00:04 db13
changed the db names but does that help?
-
changed the db names but does that help?
You did what and how? Did you do that before or after you experienced problems? Did you shutdown MySQL when you did that?
Please do not start messing around while troubleshooting.
Can you still login to MySQL from the root account? If so please do and see what is the output of the following command inside the MySQL shell:
CHECK TABLE mysql.user, mysql.host, mysql.db, mysql.tables_priv, mysql.columns_priv;
-
i chnaged the db names from the screenshot to prevent any useful info. I have not chnaged anything on the system nor messed about.
[root@bart ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 347 to server version: 4.1.22
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> CHECK TABLE mysql.user, mysql.host, mysql.db, mysql.tables_priv, mysql.columns_priv;
ERROR 1142 (42000): SELECT command denied to user 'root'@'localhost' for table 'user'
mysql>
nothing modified in case i get in trouble again ;)
thanks for your help so far cactus.
James
-
im assuming from the above there is something wrong with the root account?
-
im assuming from the above there is something wrong with the root account?
I guess so. Try this: http://wiki.contribs.org/MySQL#Restoring_accidently_deleted_MySQL_root_user
-
I guess so. Try this: http://wiki.contribs.org/MySQL#Restoring_accidently_deleted_MySQL_root_user
From what is shown above, the problem is not with the password, but with the permissions stored in the mysql db. Presumably jameswilson changed something which he shouldn't have. mysql documentation website should contain advice as to how to fix the problem, which isn't SME specific.
-
From what is shown above, the problem is not with the password, but with the permissions stored in the mysql db. Presumably jameswilson changed something which he shouldn't have. mysql documentation website should contain advice as to how to fix the problem, which isn't SME specific.
I know it is not the password as OP can login, but the link to the wiki I provided links directly to the instructions to reset permissions, which you suggested might be the solution as well.
-
I havnt chnaged anything on this box charlie. I tend to leave them alone.
following on from what charlie said the root user had no priveliges. I added them all and now mysql check is working.
Many thanks all. Now i need to work out why and how that happened