0

I have got a weird state in my mysql/ mariadb server.

When I execute show databases; it gets following result:

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| MYDATABASENAME         |
| mydatabasename         |

And when I execute drop database MYDATABASENAME; then the database mydatabasename lowercase one gets dropped and not the uppercase one. If I then execute the drop database MYDATABASENAME; again it says

ERROR 1008 (HY000): Can't drop database 'mydatabasename'; database doesn't exist

UPDATE

In my.cnf I had set lower_case_table_names=1 which caused the mysql server to handle all tables/ databases in lower case format. See my answer below.

My question is now, how can I drop the uppercase database "MYDATABASENAME"?

1
  • 1
    Try a case sensitive collaction in your drop command Commented Feb 22, 2018 at 9:49

2 Answers 2

2

If you have set lower_case_table_names=1 in your my.cnf then mysql handles/ stores all tables and databases in lower case format. So disabling the property, then executing the drop command again fixed the problem.

Sign up to request clarification or add additional context in comments.

Comments

0

It is best not to try to override the OS-based default value for lower_case_table_names.

MySQL/MariaDB depend on file and directory names based on table and database names. But Windows ignores case; *nix does not.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.