Jump to content
Larry Ullman's Book Forums

Recommended Posts

Mr. Ullman,

 

I am a beginner here, one could say. I am reading your book, PHP and MySQL for Dynamic Web Sites, and I am clueless on how to set the password on the root MySQL user. 

 

I downloaded the XAMPP and on page A8 of your Appendix A, it says "connect to MySQL client." Well for starters, what the hell is the MySQL client, is that this XAMPP? Then your appendix says to go to chapter 4 (terrible way to teach by having to cross reference) so I did that but nothing really pertaining on how to set this darn password. I tried going to the command DOS or whatever it is called, and I typed exactly what you have there but that doesn't work either, I keep on getting syntax errors.

 

Anyway please help b/e I'm stuck here and I don't feel you've explained this very well.

Share this post


Link to post
Share on other sites

Xampp is a local development stack (think server - with Apache, PHP and Mysql). You'll find a utility inside xampp where you can start both apache and PHP. Depending on your OS, look for a something like xampp-controll.exe on windows or in the xampp folder in applications if your OS X. When that is done, you should be able to hit your local server using http://localhost. This will give you a general XAMPP page with links to PHPMyAdmin (a MySQL web client) and settings such as for admin password. 

 

Google is also always your friend: https://www.apachefriends.org/faq_osx.html

 

As Xampp is a local dev server, I wouldn't really care about the admin password to be honest. Leaving it blank is simpler in most cases.

  • Upvote 1

Share this post


Link to post
Share on other sites

Thanks for taking the time to answer. I will see if I can figure this out. It seems, however, that I do need a password because when I am trying the exercises on the book, the only way I seem to be able to check the work is by having a password. In other words, I can only check how the work looks online with a password.

Share this post


Link to post
Share on other sites

Man. It's right there in the Faq. I know you are a beginner, but being able to look for information is perhaps on of the most important skills of any programmer. There's simple to much to know in the programming world to remember it all, so start getting into a habit of at least looking for the answer. :)

 

I'll quote the FAQ:

 

The easiest way is to use the security console, which you can access at http://localhost/security/ This console creates a password for the MySQL user root and adjusts the phpMyAdmin configuration.

Another approach is to configure it with the "XAMPP Shell" (command prompt). Open the shell and execute this command:

mysqladmin.exe -u root password secret

 

If you can't get that link working, make sure you've found the Xampp control panel and have started Apache and Mysql. You'll find info on that in the FAQ too.

 

Also, that said. Keep you spirits up and don't be afraid to ask on the board. There's a lot of awesome people willing to help you out here.

 

Good luck, man.

  • Upvote 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...