服务器 频道

手把手教您建WAMP动态博客网站(上)

    2.为bblog建立数据库

    # mysql -u root -p
    Enter password: xxxxxxxxx      
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1 to server version: 5.0.18-nt
    Mysql> create database b2evolution ;      "为b2evolution 建立数据库"
    Query OK, 1 row affected (0.01 sec)
    Mysql>grant all privileges on b2evolution.* to b2evolution@localhost identified by ''76543981'' ; "将建立的 bblog 权限给bblog 帐号,并且设定密码"
    mysql>quit
    Bye

    3. 测试刚建立的数据库与帐号是否可以使用

    # mysql -u bblog -p
    Enter password: xxxxxxxxx
    Your Mysql connection id is 3 to server version: 5.0.18-nt 
    Type ''help;'' or ''\h'' for help. Type ''\c'' to clear the buffer.
    Mysql> connect b2evolution ;
    Connection id:    5
    Current database:  b2evolution
    mysql>show databases;
    +--------------+
    | Database     |
    +--------------+
    | mysql        |
    | b2evolution    |
    +--------------+
    2 rows in set (0.00 sec)
    mysql>quit
    Bye

0
相关文章