Changing root password in mysql

Changing root password in mysql mysqladmin command to change root password If you have never set a root password for MySQL, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows: $ mysqladmin -u root password […]

MySQL Crib Sheet Cheat Sheet

To login (from unix shell) use -h only if needed.[mysql dir]/bin/mysql -h hostname -u root -p Create a database on the sql server.create database [databasename]; List all databases on the sql databases; Switch to a database.use [db name]; To see all the tables in the tables; To see database’s field formats.describe [table name]; […]

MySQL Backup Shell Script

***TO CREATE BACKUP SCRIPT ON LOCAL SERVERmkdir /root/binvi /root/bin/ (then copy script into this file)change parameters in script to match databasechmod 755 /root/bin/ ***TO VERIFY SCRIPT WORKS1. run this command/root/bin/mysqlbak.sh2. when script is done, check subdirs of /var/backup/db/daily for tarred & gzipped backups ***TO SCHEDULE THIS TO RUN DAILY, CREATE SYMBOLIC LINKln -s /root/bin/ /etc/cron.daily/ […]