AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Mamp phpmyadmin mysql access denied9/23/2023 ![]() Well, I’ve never written one line of PHP and I already hate it for its error handling weakness. I’ve changed it to (count($analyzed_sql_results) = 1 ) as I suppose they want to count and compare to one. The line 615 shows count($analyzed_sql_results = 1 ) which is probably not correct because it counts a boolean expression. The message is about count() not having the correct parameter. Fortunately, the message is clear: line 615 of C:\MAMP\bin\phpMyAdmin\libraries\ My common sense tells me that we should set display_errors=on and test a few screens before releasing a software. You will see that parentheses are missing, this is a syntax error and raising only a warning for that is quite bad. So this product, which is free but has also a ‘PRO’ version, probably running the same code, is delivered with bad code, raising errors that were ignored. MAMP "count(): Parameter must be an array or an object that implements Countable" Warning: mysqli_real_connect(): (28000/1045): Access denied for user (using password: YES) in C:\MAMP\htdocs\index.php on line 123īut now that I display the errors, I get this annoying message each time I try to do something in phpMyAdmin (which runs as PHP in the same Apache server): The current setting is displayed in and I can change it in C:\MAMP\conf\php7.2.1\php.ini and after a restart of the Apache server I can see full error messages: I have to set display_errors=on for that. But I’m there to play and I want to see the error messages and line numbers. This configuration is ok for production because displaying errors may give clues to hackers. ![]() With the default configuration, Apache just raises and Error 500 which does not help me a lot for debugging. I’ll write some PHP and because it’s the first time in my life, I will have some errors. With all defaults (Apache on port 80) my web server pages are on (serving the files in C:\MAMP\htdocs) and administration page is at The MySQL administration page (phpMyAdmin) is at It seems that, at least by default, I don’t need a password to go to the admin pages. The first time you start the servers, the Windows Firewall configuration is raised and you have to accept it: All that is installed under C:\MAMP (you can change it, I just kept the default settings). A setup menu to configure them, but I keep the default. This bundle is very easy to use: a simple window to start and stop the servers (Apache and MySQL). ![]() What? Reboot? Seriously, we are in 2018, that’s Windows 10, I refuse to reboot to install a simple Apache server! exe, all is straightforward and the installer notifies me that the installation will be completed after a reboot. So MAMP is like LAMP (Linux+Apache+PHP+MySQL) but with a M for MacOS, but also Windows (W being an upside-down M after all). Thus, I’ve to look at MAMP, PHP and MySQL for the first time… And I decided to load the OpenFlights open data to play with. They install MAMP (My Apache – MySQL – PHP) during their curriculum for website development, and then I’ll use this environment to teach data modeling and SQL basics. I’ll detail in a future blog post but the idea is giving a short introduction to databases to students at, a coding academy for refugees in Switzerland. ![]() You may wonder what I’m doing with those technologies that are completely different from what I usually do. ![]()
0 Comments
Read More
Leave a Reply. |