Register            Login            Blog             Contact Us    

Here are commands you need to type for each step (login as the root user):

Step # 1 : Stop mysql service

# /etc/init.d/mysql stop
Output:

Stopping MySQL database server: mysqld.

Step # 2: Start to MySQL server w/o password:

# mysqld_safe --skip-grant-tables &
Output:

[1] 5988
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[6025]: started

Step # 3: Connect to mysql server using mysql client:

# mysql -u root
Output:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.15-Debian_1-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

Step # 4: Setup new MySQL root user password

mysql> use mysql;
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit

Step # 5: Stop MySQL Server:

# /etc/init.d/mysql stop
Output:

Stopping MySQL database server: mysqld
STOPPING server from pid file /var/run/mysqld/mysqld.pid
mysqld_safe[6186]: ended

[1]+  Done                    mysqld_safe --skip-grant-tables

Step # 6: Start MySQL server and test it

# /etc/init.d/mysql start
# mysql -u root -p

 

Source link http://www.cyberciti.biz/tips/recover-mysql-root-password.html

If you want to monitor vos3000 services and start if vos3000 services stop. VOS3000 version 2.1.2.0 is stop after some time so you can monitor the vos3000 services  and start it . Here I am using three shell scripts to monitor to vos3000 service and start it. I am checking vos3000 service every 5 second and if stops I am starting with a script and send email alert.
 
1 - I have created watchdog script to check mbx3000d service and send email alert
 
Linux# nano /etc/voscheck.sh
 
#!/bin/bash
#
# watchdog
NAME=mbx3000
START=/etc/mbx3000.sh
NOTIFY=your-email-address
NOTIFYCC=your-email-address
GREP=/bin/grep
PS=/bin/ps
NOP=/bin/true
DATE=/bin/date
MAIL=/bin/mail
RM=/bin/rm
 
$PS -ef|$GREP -v grep|$GREP $NAME >/dev/null 2>&1
case “$?” in
0)
# It is running in this case so we do nothing.
$NOP
;;
1)
echo “$NAME is NOT RUNNING. Starting $NAME and sending notices.”
$START 2>&1 >/dev/null &
NOTICE=/tmp/watchdog.txt
echo “$NAME was not running and was started on `$DATE`” > $NOTICE
$MAIL -n -s “watchdog notice” -c $NOTIFYCC $NOTIFY < $NOTICE
$RM -f $NOTICE
;;
esac
 
exit
 
2 - Create script for start mbx3000 service
 
Linux# nano /etc/mbx3000.sh
 
#!/bin/bash
service mbx3000d start
 
3 - Check service every 5 second
 
Linux# nano /etc/check5.sh
 
#!/bin/bash
while true
do
/etc/voscheck.sh
sleep 5
done
 
4 - Execute the script in background
 
Linux# nohup /etc/check5.sh &

If you want to change VOS3000 browser client port address edit the
following file or find server.xml file under apache-tomcat installation conf folder
change the Connector port 80 to whatever you want which is not used on system and reboot the system.
# vi /usr/apache-tomcat-5.5.15/conf/server.xml
 
<!– Define a non-SSL HTTP/1.1 Connector on port 8080 –>
<Connector port=“80? maxHttpHeaderSize=”8192?
maxThreads=”150? minSpareThreads=”25? maxSpareThreads=”75?
enableLookups=”false” redirectPort=”8443? acceptCount=”100?
connectionTimeout=”20000? disableUploadTimeout=”true” />
Page 1 of 4

Latest Blog Updates Are Available Here