I have a stored procedure that should create a database using the value of the input variable but instead it just creates a database using the variable name itself.
DELIMITER //
CREATE PROCEDURE proc_createdb (dbname VARCHAR(128))
BEGIN
CREATE DATABASE dbname;
END //
How can I use the value of dbname instead of creating a database called "dbname".