Chinaunix首页 | 论坛 | 博客
  • 博客访问: 68230
  • 博文数量: 18
  • 博客积分: 1420
  • 博客等级: 上尉
  • 技术积分: 199
  • 用 户 组: 普通用户
  • 注册时间: 2008-08-28 11:00
文章分类
文章存档

2011年(1)

2010年(1)

2009年(2)

2008年(14)

我的朋友

分类: Mysql/postgreSQL

2008-12-07 19:17:42

我们在linux下使用mysql数据库时总是会遇到下面的问题:
mysql> create database ClassDB;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'ClassDB'
然后我们有如下输入:
**-desktop:~$ mysql -h localhost -u root -p
Enter password:
在这它要求输入密码:此时的密码为系统为root用户提供的默认密码:root
现在你就可以建立数据库了。
如下是我创建的过程:
**-desktop:~$ mysql -h localhost -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 35
Server version: 5.0.67-0ubuntu6 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database ClassDB;
Query OK, 1 row affected (0.01 sec)

mysql> use ClassDB;
Database changed

阅读(764) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~