How to DROP database with different case in the name
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
2
down vote
favorite
I tried to drop this kind of database name in MariaDB :
MariaDB [(none)]> DROP DATABASE `db_IRP_rec` ;
ERROR 1008 (HY000): Can't drop database 'db_irp_rec'; database doesn't exist
It seems mysql doesn't give a care of the case in the name of the database same if we put the name between ` `
Thanks
mysql mariadb
add a comment |Â
up vote
2
down vote
favorite
I tried to drop this kind of database name in MariaDB :
MariaDB [(none)]> DROP DATABASE `db_IRP_rec` ;
ERROR 1008 (HY000): Can't drop database 'db_irp_rec'; database doesn't exist
It seems mysql doesn't give a care of the case in the name of the database same if we put the name between ` `
Thanks
mysql mariadb
1
Do you actually have a database named like that? DoesSHOW DATABASES
list your database the way you believe it should be listed? AFAIK, database names are stored on disk in lowercase and name comparisons are case insensitive.
â Kusalananda
Jul 27 at 15:39
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I tried to drop this kind of database name in MariaDB :
MariaDB [(none)]> DROP DATABASE `db_IRP_rec` ;
ERROR 1008 (HY000): Can't drop database 'db_irp_rec'; database doesn't exist
It seems mysql doesn't give a care of the case in the name of the database same if we put the name between ` `
Thanks
mysql mariadb
I tried to drop this kind of database name in MariaDB :
MariaDB [(none)]> DROP DATABASE `db_IRP_rec` ;
ERROR 1008 (HY000): Can't drop database 'db_irp_rec'; database doesn't exist
It seems mysql doesn't give a care of the case in the name of the database same if we put the name between ` `
Thanks
mysql mariadb
edited Jul 27 at 15:35
Kusalananda
101k13199311
101k13199311
asked Jul 27 at 15:17
dubis
4181414
4181414
1
Do you actually have a database named like that? DoesSHOW DATABASES
list your database the way you believe it should be listed? AFAIK, database names are stored on disk in lowercase and name comparisons are case insensitive.
â Kusalananda
Jul 27 at 15:39
add a comment |Â
1
Do you actually have a database named like that? DoesSHOW DATABASES
list your database the way you believe it should be listed? AFAIK, database names are stored on disk in lowercase and name comparisons are case insensitive.
â Kusalananda
Jul 27 at 15:39
1
1
Do you actually have a database named like that? Does
SHOW DATABASES
list your database the way you believe it should be listed? AFAIK, database names are stored on disk in lowercase and name comparisons are case insensitive.â Kusalananda
Jul 27 at 15:39
Do you actually have a database named like that? Does
SHOW DATABASES
list your database the way you believe it should be listed? AFAIK, database names are stored on disk in lowercase and name comparisons are case insensitive.â Kusalananda
Jul 27 at 15:39
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
4
down vote
accepted
First, check whether the database exists or not.
MariaDB> show databases;
If DB exists and you cannot delete on MySQL prompt, you can clean the DB at data directory.
MariaDB> show variables where Variable_name ='datadir';
+---------------+-----------------+
| Variable_name | Value |
+---------------+-----------------+
| datadir | /var/lib/mysql/ |
+---------------+-----------------+
In my case, datas are stored under /var/lib/mysql
.
We can find a folder with the same name as the database.
just remove or move to some other path.
rm -rf /var/lib/mysql/<databaseName>
Hi, The commandshow variables where Variable_name ='datadir';
return empty value to me
â dubis
Jul 30 at 8:15
orfind / -name db_IRP_rec
and thenrm -rf /var/mysql/db_IRP_rec
that works
â dubis
Jul 30 at 10:34
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
First, check whether the database exists or not.
MariaDB> show databases;
If DB exists and you cannot delete on MySQL prompt, you can clean the DB at data directory.
MariaDB> show variables where Variable_name ='datadir';
+---------------+-----------------+
| Variable_name | Value |
+---------------+-----------------+
| datadir | /var/lib/mysql/ |
+---------------+-----------------+
In my case, datas are stored under /var/lib/mysql
.
We can find a folder with the same name as the database.
just remove or move to some other path.
rm -rf /var/lib/mysql/<databaseName>
Hi, The commandshow variables where Variable_name ='datadir';
return empty value to me
â dubis
Jul 30 at 8:15
orfind / -name db_IRP_rec
and thenrm -rf /var/mysql/db_IRP_rec
that works
â dubis
Jul 30 at 10:34
add a comment |Â
up vote
4
down vote
accepted
First, check whether the database exists or not.
MariaDB> show databases;
If DB exists and you cannot delete on MySQL prompt, you can clean the DB at data directory.
MariaDB> show variables where Variable_name ='datadir';
+---------------+-----------------+
| Variable_name | Value |
+---------------+-----------------+
| datadir | /var/lib/mysql/ |
+---------------+-----------------+
In my case, datas are stored under /var/lib/mysql
.
We can find a folder with the same name as the database.
just remove or move to some other path.
rm -rf /var/lib/mysql/<databaseName>
Hi, The commandshow variables where Variable_name ='datadir';
return empty value to me
â dubis
Jul 30 at 8:15
orfind / -name db_IRP_rec
and thenrm -rf /var/mysql/db_IRP_rec
that works
â dubis
Jul 30 at 10:34
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
First, check whether the database exists or not.
MariaDB> show databases;
If DB exists and you cannot delete on MySQL prompt, you can clean the DB at data directory.
MariaDB> show variables where Variable_name ='datadir';
+---------------+-----------------+
| Variable_name | Value |
+---------------+-----------------+
| datadir | /var/lib/mysql/ |
+---------------+-----------------+
In my case, datas are stored under /var/lib/mysql
.
We can find a folder with the same name as the database.
just remove or move to some other path.
rm -rf /var/lib/mysql/<databaseName>
First, check whether the database exists or not.
MariaDB> show databases;
If DB exists and you cannot delete on MySQL prompt, you can clean the DB at data directory.
MariaDB> show variables where Variable_name ='datadir';
+---------------+-----------------+
| Variable_name | Value |
+---------------+-----------------+
| datadir | /var/lib/mysql/ |
+---------------+-----------------+
In my case, datas are stored under /var/lib/mysql
.
We can find a folder with the same name as the database.
just remove or move to some other path.
rm -rf /var/lib/mysql/<databaseName>
answered Jul 27 at 17:08
raix d
564
564
Hi, The commandshow variables where Variable_name ='datadir';
return empty value to me
â dubis
Jul 30 at 8:15
orfind / -name db_IRP_rec
and thenrm -rf /var/mysql/db_IRP_rec
that works
â dubis
Jul 30 at 10:34
add a comment |Â
Hi, The commandshow variables where Variable_name ='datadir';
return empty value to me
â dubis
Jul 30 at 8:15
orfind / -name db_IRP_rec
and thenrm -rf /var/mysql/db_IRP_rec
that works
â dubis
Jul 30 at 10:34
Hi, The command
show variables where Variable_name ='datadir';
return empty value to meâ dubis
Jul 30 at 8:15
Hi, The command
show variables where Variable_name ='datadir';
return empty value to meâ dubis
Jul 30 at 8:15
or
find / -name db_IRP_rec
and then rm -rf /var/mysql/db_IRP_rec
that worksâ dubis
Jul 30 at 10:34
or
find / -name db_IRP_rec
and then rm -rf /var/mysql/db_IRP_rec
that worksâ dubis
Jul 30 at 10:34
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f458871%2fhow-to-drop-database-with-different-case-in-the-name%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Do you actually have a database named like that? Does
SHOW DATABASES
list your database the way you believe it should be listed? AFAIK, database names are stored on disk in lowercase and name comparisons are case insensitive.â Kusalananda
Jul 27 at 15:39