CREATE DATABASE IF NOT EXISTS nombre_db DEFAULT CHARACTER SET utf8 COLLATE utf8_spanish_ci; CREATE USER 'nombre_usuario'@'localhost' IDENTIFIED BY 'tu_contrasena'; GRANT ALL PRIVILEGES ON * . * TO 'nombre_usuario'@'localhost'; FLUSH PRIVILEGES;