I am developing a web project using Java and MySQL. I am using Mysql Workbench. I started the work but now I need to change the database name. I tried
ALTER DATABASE Test MODIFY NAME = NewTest
and
USE master
GO
ALTER DATABASE Test
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE Test MODIFY NAME = NewTest
GO
ALTER DATABASE NewTest
SET MULTI_USER
GO
But these two are showing syntax error. What is the proper way to change database name in MySQL?