As it is a best practice to install Drupal and CiviCRM into separate database instances, we shall do so.
We shall set two instances one for Drupal on port 3307 and the second for CiviCRM running on port 3308
First we create an user to manage database instances. In MySQL prompt we do
$ sudo mysql -u root -p
mysql> GRANT SHUTDOWN ON *.* TO 'multi_admin'@'127.0.0.1' IDENTIFIED BY 'multi_pass';
We shall setup our MySQL configuration file in /etc/my.cnf . We create the appropriate folders as put in the configuration file and set permissions to the user mysql on these folders