|
Various Mysql Bits!
This is a collection of mysql commands that I sometimes need and more often than not forget! Typically you have just installed and need to fine tune. So finally hear they are in a list, with descriptions!
First get mysql
http://dev.mysql.com/downloads/mysql/5.0.html
Most people only need the standard install
Run the installer and use the System Preferances Mysql pane to start
___
You may want to add
/usr/local/mysql/bin/./mysql to your path
___
After install the first thing to do is set up the root user password
Log in as root first
mysql -u root
SET PASSWORD FOR root@localhost=PASSWORD('Your_password');
___
Using a cron Script to automate a mysql action dumping the output to a file called test 1
/usr/local/mysql/bin/./mysql -vvv -h localhost -uroot -pYour_password < /sql_scripts/Your_script.sql > /test1
Note
(Getting rid of the -vvv will clean up the fancy output from mysql)
|
|