New to XAMPP -- Need help with MySQL

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

New to XAMPP -- Need help with MySQL

Postby matt452 » 21. September 2013 17:08

Hey folks,

I'm entirely new to XAMPP, in fact i'm not even 100% sure what it's used for. I downloaded the program because it was a requirement for a class i'm taking on MySQL databases.

I've figured out how to start the MySQL database, and now i'm trying to start the MySQL monitor to do my first assignment, however I'm finding the instructions in my textbook don't work, and the lessons from my teacher simply say to read the textbook.

The book tells me to type the following into terminal:

Code: Select all
$ mysql --user=root

terminal tells me that this command cannot be found. When i used the Manager program supplied with XAMPP, if i click on configure to open Console, Console tells me that I don't have permission to access the resource. I'm sure I need to type in a password somewhere, but I'm unsure where.

Any help is greatly appreciated. I am entirely new to this subject of computers (I've done a lot of programming before, but never done any networking), and I'm getting pretty stressed out.

Posts: 1
Joined: 21. September 2013 17:04
Operating System: Mac OS X 10.8.5

Re: New to XAMPP -- Need help with MySQL

Postby iggyvolz » 28. September 2013 03:57

It's in there, it's just buried. It's located here: /Applications/XAMPP/xamppfiles/bin/mysql with a bunch of other scripts. If you want to run the command you listed, you'd have to do:
Code: Select all
/Applications/XAMPP/xamppfiles/bin/mysql --user=root

Or, you can "bookmark" the mysql script by running this:
Code: Select all
sudo cp /Applications/XAMPP/xamppfiles/bin/mysql /usr/bin

And from here on out, you can use the script from your book. Make sure you run this every time you update xampp (because the mysql script will likely change, the copy in the /usr/bin folder won't be updated). Note that you may, depending on your computer's settings, have to run mysql under "sudo", by beginning the command with the word "sudo" then the command. You'll only have to do this when running the mysql command, using sudo will do nothing.

As an unrelated side note, you can also do this with the xampp script so that instead of typing "sudo /Applications/XAMPP/xamppfiles/start" you can type "sudo xampp start":
Code: Select all
sudo cp /Applications/XAMPP/xamppfiles/xampp /usr/bin

Again, make sure you run this when you update xampp because the script may be updated but you'll have to update the /usr/bin script manually.
Posts: 6
Joined: 10. August 2013 20:48
Operating System: Mac OS X

Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 10 guests