Hi, If you just trying to deploy your locally developed OpenCart, WordPress or Magento site on the live server and facing issue look like:
#1044 - Access denied for user 'himstar'@'localhost' to database 'tricksway_cart'
CREATE DATABASE IF NOT EXISTS `tricksway_cart` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;.
Then you are at a right place, I'm going to share a complete tutorial about fixing such PhpMyAdmin issue.
Reason behind PhpMyAdmin #1044 - Access denied for user Error-
Let's assume you are creating an OpenCart eCommerce website, at the starting, you have to enter your database details in process of installation. Our first step to creating a database from local server, is it ? Definitely 'Yes'.
After that, we simply enter 'root' as username and almost all of us leave password field for local server. When our task completed we uploaded every file easily on server but start getting error while uploading on database file, because-
1- You can't create direct database name on your live server (at least for shared server), for example, if your Cpanel username is 'name' then your database name will be somewhat-
2- In your local server your username is 'root', but still as above you can't create username root for a live server in PhpMyAdmin.
I think I cleared the actual point now we have to move on the solution.
Fix PhpMyAdmin Error 1044 Access denied
Process is very simple, just follow few steps carefully-
1- Login your Cpanel and create database and user (try to keep both names same) and provide user to all privileges for the same database.
Database: cpanelusername_test Username: cpanelusername_test
2- Open your .sql file in any advanced text editor (Ex- Notepad++, Sublime Text etc).
3- Change .sql local database value as recently created live Cpanel username and database value, as below image.
4- Import .sql file in live PhpMyAdmin above created database.
It Works !!, Let me know your feedback about this tutorial.