mysql tips     
MySQL
To create a database:
CREATE DATABASE name;

To create a user:
GRANT ALL PRIVILEGES ON dbname.* TO 'monty'@'localhost' IDENTIFIED BY 'password';

To reload grant tables:
mysqladmin reload -p

To set a password:
SET PASSWORD = PASSWORD('biscuit'); (for the user you're logged in as)
SET PASSWORD FOR 'jeffrey'@'%' = PASSWORD('biscuit');

Export all databases:
mysqldump -u user -p database [table 1]

Import all databases:
mysqlimport -u user -p database < import.sql

Search and replace text in fields:

UPDATE [table] SET [field] = replace( [field], "search_for", "replace_with" ); 

Updated Jan 30, 2008

# of readers
home
about me
blog archives
- docs
acroread
firefox
java
linux
mysql
perl
rpm
shell
vim
win

entertainment
experiences
funny lists
humor
intellectual
interests
mefi
music
opinions
photos
web designs
tools
webmaster help

Sign up
Enter your e-mail address below to be notified of new posts:






Search

  


Random quote
(View all quotes)
"Anyone who has never made a mistake has never tried anything new. -- Albert Einstein"










Licensed under Creative Commons
(?) Choose theme:  X X X X X X


Loaded in 0.0076 seconds