first step, config, can't connect to db, super common
first step, config, can't connect to db, super common

Hello,
I see this Q googling
I see change localhost to 127.0.0.1
Gotta be php5.3 or higher, I'm using 7.2
Must be this type....I'm using Plesk
I see check the user and pw. I have dozens of scripts on the server with the user/pw setup
I don't recall having port as an option in any other script just the :3306. so I tried separate and together in the config php
directions list charset and I have tried ut8_general_ci and charset=utf8mb4 which is in the notes
"pdo" in directions
"pdoAttr" in the code to edit
I tried null, $database, and array because...I don't really know what the goal is with that variable
I pasted the sql text using phpmyadmin
Soooo I deleted everything, db, files, you name it and redid everything
Same errors.
This is on a local server suppose 1.2.3.4 For other scripts, I can use 1.2.3.4, 127.0.0.1, and localhost:3306 and each work fine
I still can't connect and I'm sorry to be that noob that asks a repeated question but, I've tried everything I googled and found
This question has an accepted answers - jump to answer
Answers
DataTables warning: table id=example - An error occurred while connecting to the database ''. The error reported by the server was: SQLSTATE[HY000] [2002] No such file or directory
That's an error from the database. So the connection is OK, it sounds like the table isn't setup correctly. Can you verify your
config.php
file, ensuring you can connect to the DB with the same properties. Then if so, please post your scripts that Editor uses to connect to the DB, please.Colin
Hi Colin,
I // commented out the dsn and pdoAttr lines and the development deploy block and it works
I'm a little concerned about the first two "biting" me in the future, but all's good now.
Thank you for the reply