Originally published at Random Geekage You can comment here or there.
Restore a MySQL database from a dump file:
mysql -u root -p databasename< file.sql
Backup a MySQL database to a file:
mysqldump -u root -p databasename > file.sql
Creating a new user and database in MySQL:
First, load up the mysql client:
mysql -u root -p
Create the database:
CREATE DATABASE databasename;
Create the user:
GRANT ALL PRIVILEGES ON databasename.* TO "databaseuser"@"hostname" IDENTIFIED BY "password";
All done, clean up and exit:
FLUSH PRIVILEGES; EXIT;
Originally published at Random Geekage You can comment here or there.
A lot of folk these days are using Gmail as their email provider. There are some good (interface is the best I have used) and bad (the whole cloud computing thing) points to this. An entry on Digg popped up in my news feeds with a link to a program called Gmail Backup. It does exactly what it says. You give it your login details, pick a folder and it dumps all your email into that folder so in the event of Google being evil, you have a backup of all your mail. Very handy.
Comes in both Windows and Linux flavours. The Linux one needs a copy of wxpython installed. There is a command line mac version but it is unsupported.
