Create database in SQL and get an error but everything right

dasfex :

I try to install fleetspeak. Use Ubuntu 18.04. First of all I run this

CREATE USER 'fleetspeak-user' IDENTIFIED BY 'fleetspeak-password';

Then I want to create database with this

CREATE DATABASE 'fleetspeak';

But has an error:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''fleetspeak'' at line 1

Why I can get this?

Ajith :

Try the create database script without single quotes in dbname

CREATE DATABASE fleetspeak;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=301553&siteId=1