+ -
当前位置:首页 → 问答吧 → mysql 求高人指点下!!

mysql 求高人指点下!!

时间:2008-09-22

来源:互联网

本来很正常。好像停了下电。(如果有其他原因就不知道了)。然后就出了以下问题:

[root@localhost ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 30 to server version: 4.0.20-standard-log

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

mysql> create database test;
ERROR 1007: Can't create database 'test'. Database exists

mysql> show databases;
+----------+
| Database |
+----------+
| test |
+----------+
1 row in set (0.00 sec)

mysql>

查了很多资料。说权限不够。但是按照上面说到俄方法试了还是不行。之前没遇到过这样的问题啊。怎么突然就有了呢?

我注意到在 show databases 的时候只有之前建的test 而没有mysql; 按理说这个mysql 应该默认有的吧?

到底出了什么问题?

还有就是:很多资料都说权限不够,要在服务器上放开权限。难道就是说。到服务器去操作?不能远程登录?服务器的房间的钥匙。我这几天拿不到。再者我也怀疑是不是这样的原因。

请高手指教下阿!!

补充:我之前建立的一些数据库比如/var/lib/mysql 下的数据库。怎么里面有很多没有东西了。难道是被谁恶意删除了? 具体如下: jobmanager 和jobmanagement 是我的数据库。我LS 后却发现里面或者空。或者只有一个文件。


jobmanagement localhost-bin.030 localhost-bin.061
jobmanager localhost-bin.031 localhost-bin.062
localhost-bin.001 localhost-bin.032 localhost-bin.063
localhost-bin.002 localhost-bin.033 localhost-bin.064
localhost-bin.003 localhost-bin.034 localhost-bin.065
localhost-bin.004 localhost-bin.035 localhost-bin.index
localhost-bin.005 localhost-bin.036 localhost.localdomain.err
localhost-bin.006 localhost-bin.037 localhost.localdomain.pid
localhost-bin.007 localhost-bin.038 mysql
localhost-bin.008 localhost-bin.039 test
localhost-bin.009 localhost-bin.040

[root@localhost mysql]# cd jobmanager
[root@localhost jobmanager]# ls
obinstanceinfo.frm

[root@localhost jobmanager]# cd ..

[root@localhost mysql]# cd jobmanagement/
[root@localhost jobmanagement]# ls
[root@localhost jobmanagement]#

作者: 伊泽浩   发布时间: 2008-09-22

好像没抱错吧!

[root@localhost mysql]# myisamchk -c *.MYI
Checking MyISAM file: columns_priv.MYI
Data records: 0 Deleted blocks: 0
- check file-size
- check record delete-chain
- check key delete-chain
- check index reference
- check data record references index: 1

---------

Checking MyISAM file: db.MYI
Data records: 2 Deleted blocks: 0
- check file-size
- check record delete-chain
- check key delete-chain
- check index reference
- check data record references index: 1
- check data record references index: 2

---------

Checking MyISAM file: func.MYI
Data records: 0 Deleted blocks: 0
- check file-size
- check record delete-chain
- check key delete-chain
- check index reference
- check data record references index: 1

---------

Checking MyISAM file: host.MYI
Data records: 0 Deleted blocks: 0
- check file-size
- check record delete-chain
- check key delete-chain
- check index reference
- check data record references index: 1

---------

Checking MyISAM file: tables_priv.MYI
Data records: 0 Deleted blocks: 0
- check file-size
- check record delete-chain
- check key delete-chain
- check index reference
- check data record references index: 1
- check data record references index: 2

---------

Checking MyISAM file: user.MYI
Data records: 4 Deleted blocks: 0
- check file-size
- check record delete-chain
- check key delete-chain
- check index reference
- check data record references index: 1
- check record links
[root@localhost mysql]#

作者: 花花86   发布时间: 2008-09-22