删除数据库时出错(无法 rmdir '.test\',错误号:17)

2023-06-02数据库问题
4

本文介绍了删除数据库时出错(无法 rmdir '.test\',错误号:17)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

基本上,我学会了如何使用mysqladmin -u root -p password"命令创建 root 密码,这完全是通过 windows 命令编辑器完成的.现在,下一个过程是显示默认数据库(info.schema、mysql 和 test),这是通过使用SHOW DATABASES;"实现的

Basically, I was taught on how to create a root password using the "mysqladmin -u root -p password" command, this was done all through the windows command editor. Now, the next process was to display the default databases (info. schema, mysql and test) which was achieved by using "SHOW DATABASES;"

但是按照书上的说法,我们不得不删除多余的测试文件,然后弹出如下错误:

But according to the book, we had to delete the redundant test file and the following error pops up:

删除数据库时出错 (Can't rmdir '.test\', errno: 17)

Error Dropping Database (Can't rmdir '.test\', errno: 17)

使用的命令是DROP DATABASE test;

我正在使用 MYSQL 和 PHPMYADMIN.有关如何无错误地删除文件的任何帮助?

I am using MYSQL and PHPMYADMIN. Any help on how to drop the file with no errors?

推荐答案

一个数据库是用数据目录下的一个目录来表示的(通常是/var/lib/mysql),这个目录的目的是用于存储表数据.

A database is represented by a directory under the data directory (usually /var/lib/mysql), and the directory is intended for storage of table data.

DROP DATABASE 语句将删除所有表文件,然后删除代表数据库的目录.但是,它不会删除非表文件,从而无法删除目录.

The DROP DATABASE statement will remove all table files and then remove the directory that represented the database. It will not, however, remove non-table files, whereby making it not possible to remove the directory.

MySQL 无法删除目录时显示错误消息

MySQL displays an error message when it cannot remove the directory

您可以通过删除数据库目录中的任何剩余文件然后删除目录本身来手动删除数据库.

you can really drop the database manually by removing any remaining files in the database directory and then the directory itself.

这篇关于删除数据库时出错(无法 rmdir '.test\',错误号:17)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

Mysql目录里的ibtmp1文件过大造成磁盘占满的解决办法
ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致...
2025-01-02 数据库问题
151

按天分组的 SQL 查询
SQL query to group by day(按天分组的 SQL 查询)...
2024-04-16 数据库问题
77

SQL 子句“GROUP BY 1"是什么意思?意思是?
What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)...
2024-04-16 数据库问题
62

MySQL groupwise MAX() 返回意外结果
MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)...
2024-04-16 数据库问题
13

MySQL SELECT 按组最频繁
MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)...
2024-04-16 数据库问题
16

在 Group By 查询中包含缺失的月份
Include missing months in Group By query(在 Group By 查询中包含缺失的月份)...
2024-04-16 数据库问题
12