Apache, PHP, MySQL, PDO, Permission Denied , Laravel
I'm working on a fun little PHP web application (a manager for my repeating, daily tasks), mostly for the exercise. The 'production' server is a bit limiting, and I cannot view httpd's (Apache's) error logs there, so I've set up my own local httpd as a development server (just good sense). However, my web app makes use of a MySQL database. I will create a local one eventually, but I thought, to make things easier to start, I would just use the remote one.
SQLSTATE[HY000]  Permission denied.
This is what came back each time I tried running the web application from my local httpd. I'm using PHP's PDO database interface, and its mysql driver, and it works when deployed on the remote server. I made sure that my remote server had permissions for my local user. I tested connecting from my local machine from the mysql client, and it worked. I tested the PHP connection statement from the command-line and ... it worked. It is only causing a problem when running within the web application.
Please tell me how to solve this issue. This is the site on which i am getting error
Some various server provider gives us their database server name. And instead of writing
127.0.0.1 we have to write their given server name.
I was trying to solve this problem since last 8 hours but didn't found single solution but anyhow I have now solved it.
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?