Page 1 of 1

One solution for 100 problems

PostPosted: Wed Apr 29, 2009 10:40 am
by globalme
I have seen many problem get solved once we run below command :

mysqlcheck --auto-repair asterisk -ppassword

1) How to provide a link in admin section of the portal where even the normal tech guy can click and repair the db ?

2) How to add these line in cronjob so that when we start the server , db get repair automatically ??

PostPosted: Wed Apr 29, 2009 10:43 am
by gardo
You can add it to /etc/rc.local. That's the file responsible for automatically starting programs on bootup.

PostPosted: Wed Apr 29, 2009 10:53 am
by globalme
Trick is when we run that command, it asks for password.

How to bypass that ?

PostPosted: Thu Apr 30, 2009 5:48 am
by gardo
mysqlcheck --auto-repair asterisk -p"password"

Where "password" is the password without the quotes. That should do the trick.

PostPosted: Thu Apr 30, 2009 10:17 am
by globalme
In my case password is blank , so in mine , statement would be

mysqlcheck --auto-repair asterisk -p""


OR

mysqlcheck --auto-repair asterisk -p

PostPosted: Thu Apr 30, 2009 11:49 am
by globalme
Tried mysqlcheck --auto-repair asterisk -p"" but it get stuck at

enter password :

PostPosted: Thu Apr 30, 2009 12:23 pm
by marcin
You have to put root password for mysql between quotes:
i.e. if mysql root password is gue12T7
the command should look :
mysqlcheck --auto-repair asterisk -uroot -p"gue12T7"
or
mysqlcheck --auto-repair asterisk -uroot -pgue12T7
in case of blank password use this:
mysqlcheck --auto-repair asterisk -uroot -p""
if there is no password for root use this :
mysqlcheck --auto-repair asterisk -uroot