-
Member
MySQL Error During Database Creation
Hi!
I'm attempting to create a personal private server and I encountered this error in MySQL Workbench:
CREATE DATABASE `world` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci | Error Code: 1007. Can't create database 'world'; database exists
I can create all the other databases just fine with no errors. I'm probably just stupid but what the guide said on how to fix it didn't really help me much...
"...if you already have those databases in use, you will need to edit 'create_mysql.sql' file and config files to use different database names."
Any help is appreciated. Thank you!
Last edited by HimeHowler; 04-12-2020 at 04:01 AM.
-
Elite User
Have you read the error message?
Your script tries to create a database "world" but there is already a database with that name. You either delete the existing database or use a "if not exists" in your script.
CREATE DATABASE IF NOT EXISTS database_name;
-
Post Thanks / Like - 1 Thanks
stoneharry (1 members gave Thanks to Queuete for this useful post)