I’ve previously had php, Mysql running on this Mac (along with Apache, of course). but that was over a year ago and before an internal AND external drive failure! (One more strike??!!)
Anyway, I now have a newer version of Apache (from the OS re-install and update [10.6.5]) and downloaded the “Build Your Own Database Driven Web Site Using PHP & MySQL, 4th edition” PDF. The easy part, getting Apache is done; I get “It works!” via the localhost url, instead of the illustration in Fig. 1.22 on page 29. Red flag #1? :eek2:
I thought I had mySQL set up correctly but noticed some points where the book said I should get a request for my admin password and did not. However, things seemed to proceed normally, otherwise. Once I got to the top of page 28, the command line: mysqladmin status returned the expected “Uptime: 2987 Threads: 1 Questions: 16 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 8 Queries per second avg: 0.5” That looked encouraging, right?
Now, I get to a more obvious problem: changing the password to mySQL. Page 45 checks the access to mySQL slightly differently, but it still outputs fine, as far as I can see: “Uptime: 3501 Threads: 1 Questions: 17 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 8 Queries per second avg: 0.4”
OK, lower part of page 45, ‘set the root password for [the] server:
mysqladmin -u root -p password “newpassword”’
I carefully chose the same password as my computer admin account for now, certainly should not forget that one! However, here the book is a little disjointed. There is some text about how the world may stop if one forgets the new password and a blank line for writing down the new password and then the continuation of the process of actually changing the password back on page 45! I now see that the book says after entering the password changing command, that I am expected to just press Enter “since the root user has no password at this point.” Excuse me? Didn’t I just tell mySQL to change the password? So, did I change the password or not?
What I did, before reading the part about simply entering “Enter” was to enter the new password. DOH! But, here is what I got:
mysqladmin -u root -p password “airbus1965”
Enter password: airbus1965
mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘root’@‘localhost’ (using password: YES)’
My first assumption was that I should not have included the quotation marks (not covered in the “Conventions used in this book”, BTW). Tried the same 'change password command, sans the quotes but got the same results. Of course…
BTW, mysqladmin -u root status still produces:
Uptime: 4526 Threads: 1 Questions: 18 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 8 Queries per second avg: 0.3
And, mysqladmin -u root -p status still produces Uptime: 4621 Threads: 1 Questions: 19 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 8 Queries per second avg: 0.4 simply by using “Enter.” According to page 47, I should be getting an “Access denied” message because root now has that new password.
Question: How many times should I do the same thing before getting different results?!
Sorry for such verbosity, just trying to provide enough details to get anyone who wants to help me on the same page. And, if I don’t hear from anyone by then, Merry Christmas!" :hohoho: