Setting up a new UTF8 MySQL Database
01/20/2010
Create a UTF8 database:
> CREATE DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Create a user for the database:
> CREATE USER 'user_name'@'localhost' IDENTIFIED BY 'user_pass';
Grant all privileges to the user:
> GRANT ALL PRIVILEGES ON *.* TO 'user_name'@'localhost' WITH GRANT OPTION;
> FLUSH PRIVILEGES;
You should probably not give him all privileges on all databases, but you can change that as needed.
If for some reason the IDENTIFIED BY clause did not work (you probably uses '%' instead of 'localhost'), then do the following to fix that users password.
# mysql -u root -p
> use mysql;
> UPDATE user SET Password = PASSWORD('new_pass') WHERE User = 'user_name';
Thats it. Enjoy...
Tags
Amazon
Apache
Audio
Austin Hill
Capistrano
Career
Clean Urls
CMS
Community
Consulting
Culture
Cyberduck
Debian
Development
Django
Drupal
Dynamo
Eurotrip
ffmpegx
Git
github
gitosis
GiveMeaning
Google Maps
Linux
Mac
Macports
Media
Mesh Conference
Mouse Gestures
MySQL
NginX
Package Management
Parallels
Philanthropy
PHP
Preview
Rails
Rapid Development
Rebuttal
Relational Scaling
Resize
Rip
Ruby On Rails
Satchmo
Security
SimpleDB
Society
SQS
SSH Key
Textmate
Tom Williams
Trends
Ubuntu
Web
Web Services
Windows
Wordpress
Workflow
YouTube
Will Stevens
I am a web developer who is obsessed with improving the efficiency and impact of web based applications.
From high level business strategies to clean and simple CSS design, there are always improvements that can be made...
From high level business strategies to clean and simple CSS design, there are always improvements that can be made...

