Follow me as I struggle with rogue technology, insane programmers, and impossible math questions in a battle to the death.

Thursday, October 30, 2008

Commands to create a MySQL database

I haven't managed to memorize all the intricacies of MySQL data creation and grant commands, so here are the commands I occasionally need:

drop database if exists mydb;
create database mydb;
use mydb;
grant all on mydb.* to 'myuser'@'localhost' identified by 'mypasswd';


Here's the ultra lazy, one line search and replace, insecure, global access version:

drop database if exists foo;
create database foo;
use foo;
grant all on * to 'foo'@'localhost' identified by 'foo';


Note: I usually put my SQL in a file and run the file from the MySQL monitor. Unfortunately, sometimes the grant commands don't work when they're run from a file. As a result, I have to manually type the commands into at the prompt. I don't know why.

Labels:

Thursday, October 02, 2008

Add the terminal to the desktop right click menu in Fedora or Ubuntu

When you right click the mouse in Red Hat Enterprise, you get the terminal in your menu. I've always wondered why you didn't get that feature in default in the default Gnome for Fedora or Ubuntu

It turns out it's easy to add in at the terminal in either.

In Fedora:

sudo yum install nautilus-open-terminal

In Ubuntu:

sudo apt-get install nautilus-open-terminal

Then reboot X.

Found on the Fedora Forums.

Labels: ,