create a first user and a first database for him in mysql

第一个username/password应该是root和root的密码.其余的应该是新建用户的用户名和密码.

mysql --user=<username> --password=<password>

create user <username> identified by '<passpord>'
\g

create database <dbname> charater set utf8
\g

grant all privileges on <dbname>.* to <username>@localhost identified by '<password>'
\g

\q

posted on 2008-05-30 23:22  deerchao  阅读(378)  评论(0编辑  收藏  举报