You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
576 B

  1. #!/bin/sh
  2. PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/ccs/bin
  3. LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
  4. export PATH
  5. export LD_LIBRARY_PATH
  6. pid=`/usr/bin/ps -e | /usr/bin/grep mysqld | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
  7. [ "$pid" != "" ] && /usr/local/bin/mysqladmin shutdown
  8. #---
  9. #/usr/ucb/echo -n "Remove DATA Directory (All data expire) [Y/N]? "
  10. #read I
  11. I=No
  12. case "$I" in
  13. Y*|y*)
  14. /usr/ucb/echo -n "Removing MySQL DATA ALL..."
  15. rm -rf /usr/local/mysql-data
  16. echo "done."
  17. ;;
  18. *)
  19. echo "not purge DATA directory"
  20. ;;
  21. esac;