Category Archives: Mysql

How to reset the MySQL root password on Ubuntu Linux

sudo /etc/init.d/mysql stop sudo mysqld –skip-grant-tables & UPDATE user SET Password=PASSWORD(‘NEWPASSWORDHERE’) WHERE User=’root’; FLUSH PRIVILEGES; exit; sudo /etc/init.d/mysql stop sudo /etc/init.d/mysql start

Simple Mysql Backup Script can be used with Crontab

This script backs up all databases on the server it’s running on. Usually ran as a cron job. Hope someone else can use this as well. #!/bin/bash # Backup ALL mysql databases # by crouse – https://crouse.us x=`mysql –user=root –password=REMOVED -B -e "show databases" | wc -l `; y=$((x-2)); for i in `mysql –user=root –password=REMOVED… Read More »