Access denied for user 'username'@'localhost' to database 'my_database' means:
the user 'username' doesnot have enough or no privilege to access (insert, update, create, drop/delete) the database 'my_database'.
1. Create the database in cPanel2. DONOT assign a user [Main thing]
3. Use phpMyAdmin -> Select the database you want to import the tables -> Go to Import tab and browse for the file -> Click "Go"
4. You will see "Import has been successfully finished ..." message.