Category Archives: MySQL

Add user in mysql

123CREATE USER ‘YOUR_USER_NAME’@'CONNECTING_FROM_WHERE’ IDENTIFIED BY ‘THIS_USER_PASSWORD’; GRANT ALL PRIVILEGES ON *.* TO ‘YOUR_USER_NAME’@'CONNECTING_FROM_WHERE’ WITH GRANT OPTION; FLUSH PRIVILEGES;

Posted in MySQL | Leave a comment

Calling a mysql query from linux or dos command line

There are times when you want to call a mysql command from the bash or dos script then call this script in a scheduler (cron job). The example below will show you how to do so. 1mysql -uYOURUSERNAME -pYOURPASSWORD -DYOURDATABASE … Continue reading

Posted in Database, Linux, MySQL | Leave a comment

MySQL Backup and Restore – Using Command Line

Here is how you backup database using command line. The first line is to backup and the second line is to restore. These commands work on both Windows and Linux. In Windows you might want to setup mysql bin directory … Continue reading

Posted in Database, Linux, MySQL | Leave a comment