试过127.0.0.1 不行,我用的WINXP PRO,会不会和我登陆的用户没有administrator权限有关?
晚上回家试试看,大虾继续帮忙呀
晚上回家试试看,大虾继续帮忙呀
解决方案 »
- 求助:mysql数据库内汉子显示乱码如何处理
- mysql数据库的sql语句查询
- mysql服务器启动路径的问题
- (100分愿闻其详)MySQL如何做到高并发、高可用性、高性能
- mysql在客户端修改root密码后,客户端能登陆,服务器上密码没变,新密码登陆不了,抑郁了,详见帖子!
- show database后显示->
- 请问应该怎么写这个SQL?
- 关于SQL语句的问题?在线等待
- 用mysqldump导入数据库失败的问题
- 谁能把sql server7.0和mysql做个比较。
- Unknown column 'XXX' in 'field list'(java增加mysql数据库记录的问题)
- mysql5.1.7乱码问题!!!
database是单数,而不是复数databases
我一直用root登陆的
用的也是
create database mydb;不行,
总提示没有:root@localhost权限。
下面产生一个Myserver.err文件,文件内容如下:
Myserver是我的机器名。InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
060803 20:48:56 InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
060803 20:48:57 InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
060803 20:48:57 InnoDB: Log file .\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
060803 20:49:07 InnoDB: Started
MySql: ready for connections.
Version: '4.0.20a-nt' socket: '' port: 3306
060803 20:49:43 MySql: Normal shutdown060803 20:49:43 InnoDB: Starting shutdown...
060803 20:49:45 InnoDB: Shutdown completed
060803 20:49:45 MySql: Shutdown Complete
mysql -uroot -h localhost 试试看
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for th
e right syntax to use near 'mysql -uroot -h localhost' at line 1
我的是XP ,安装的版本是4.0.20d
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'my
sql -u root' at line 1
mysql>
我的mysql安装在c:\mysql,所以相应的bin目录就是c:\mysql\bin.Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.C:\mysql\bin>mysql -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.22-community-max-logType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql>
因为我的root用户是没有密码的,所以就不用参数-p了,而且默认登录的主机是localhost,所以-h可以加也可以不加。
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11 to server version: 4.0.20a-debugType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> show databases;
+----------+
| Database |
+----------+
| test |
+----------+
1 row in set (0.00 sec)mysql> create database mydb;
ERROR 1044: Access denied for user: '@localhost' to database 'mydb'
mysql>
帮忙看看,都是默认安装,为什么不能够create databse?
还有,show databases 命令看不见默认的MySql 数据库,
就是这个搞不懂
InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
060805 20:27:08 InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
060805 20:27:08 InnoDB: Log file .\ib_logfile0 did not exist: new to be createdInnoDB: Setting log file .\ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
060805 20:27:09 InnoDB: Log file .\ib_logfile1 did not exist: new to be createdInnoDB: Setting log file .\ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
060805 20:27:17 InnoDB: Started
c:\mysql\bin\mysqld: ready for connections.
Version: '4.0.20a-debug' socket: '' port: 3306
060805 20:35:31 Aborted connection 11 to db: 'unconnected' user: 'root;' host:
`localhost' (Got an error reading communication packets)
-----------------------------------剛裝好時是好好的,root登入可以看到 mysql的數據庫執行 < create.sql 後 (裡面是一段 create database ...)再用 root 登入後就隻能看到 test 這個 db但此時網站用 ado 連接的 root, password,mydb 還可以正常讀取數據在命令行卻不能做任何操作,均說類似於
D:\mysql\bin>mysql -u root mysql;
ERROR 1049: Unknown database 'mysql;'
您好,我们是“2006中国杰出数据库工程师评选”活动组委会。
您的帖子已经被我们转载到本次评选官方网站的“专家在线答疑”区。
http://www.bestdba.cn/match_discussion.aspx在那里,进入本次评选终选的30位数据库工程师将与您展开积极的互动。他们会为您的问题提供满意的答案,此外,您还可以在“专家在线答疑”区提出新的问题并参与讨论。您的帖子位于:
http://www.bestdba.cn/match_discussion3.aspx?pointid=530&pointid2=1&pointid3=5&pcount=stc
非常感谢您对本次活动的支持!
--------------------------------------------------------------
xxx 为你的 root 密码注意要区分 大小写
其他的参数要加 空格,
呵呵 :)
当你以超级用户root登陆后,show databases应该显示出MySQL这个数据库,超级用户root的设置权限操作都是使用MySQL这个数据库的引起这个问题的原因有可能是版本或下载时候缺失文件引起的,最好重新下载一个版本