My Web Dev journey detailed log
Week’s Progress:
-
Fixed a DB connection issue after migrating from Lubuntu 16 to Win 10. Figured out that a DB connection parameters was wrong.
$servername = "localhost:3308"; //Correct port used by MySQL on Win 10
-
Wrote a script in case of future DB issues investigations.
-
Figured out a DB Admin Use Case.
Thoughts: It was a tough week of investigation, I felt very uncapable, but diving into MySQL, PHP and Wampserver documentation with a bug perspective made me learn more than ever about these systems.
Link to tweet: @SRoccoli Week 17
Link to work:
My Lubuntu installation for web development crashed and I may have to reinstalled the OS!
Fortunately on a second partition, I had installed Win 10. I recreated my web dev environment, based on:
- WAMPServer
- Notepad++
- Git
and pulled the HIW repository.
As right there's no installation and configuration process for Win 10 environment, it was really a good time to practice and write it.
I was expecting to start coding exactly where I left previously. But unfortunately, there was a problem of database connection, exactly where it was fine on Lubuntu.
Can't save a new cardboard! :-(
SQLSTATE\[HY100]\[1045] Access denied for user 'homeinventorydev'@'localhost' (using password: YES)<br>
code: 1045
Investigation:
- Dived again in MySQL documentation
- Looked through similar issues on Stackoverflow
- Looked for MySQL v8.0 version changes
- Looked for Wampserver PDO plugin
- Looked for MySQL config file
- Changed the connection parameters, user login, user privileges multiple times
Finally I got it fixed! When I precised the port value used by MySQL
Precised in the DB connection params:
$servername = "localhost"; //Originally
DB connection params, now updated:
New cardboard can be saved, problem solved!
After struggling so much: