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
Automator
Backpacking
Budget Travel
Career
CMS
Community
Consulting
Cyberduck
Debian
Development
Django
Drupal
Dynamo
EC2
European Travel
Eurotrip
ffmpegx
Framework
Git
github
GiveMeaning
Image
LAMP
Mac
Macports
Memcached
Mesh Conference
mod_python
Mongrel
Mongrel Cluster
Mouse Gestures
MySQL
NginX
Package Management
Parallels
Philanthropy
PHP
Preview
Python
Rails
Rapid Development
Relational Scaling
Resize
RoR
Ruby On Rails
S3
Satchmo
SimpleDB
SQS
SSH Key
Textmate
Trends
Ubuntu
Web
Web Services
Workflow
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...

