Jump to content

Terminal Xampp Mysql Access


rick.emmet

Recommended Posts

Hi Everyone,

I just installed XAMPP for Mac OS and inserted permissions into the "user" and "db" tables of the mysql database for a type of user. This is the normal way we did this in a PHP class - the db_function that is called when a user wants to access their database has the host, the type of user, the password and the database the user has access to. This system provides the permissions to the database in question and the password a user creates (and uses to log in) is stored in said database.

 

I tried to to create a new user for this database and got a permissions error. This has happened before in a PC environment; you can insert the user info and permissions and see all the Ys in the permission columns you want the user to have - but those privileges aren't actually granted. In the PC environment you must use the command line to issue grants to users. OK, I tried a shortcut on the Mac (might as well see if it works) and it behaves like the PC. No problem, I'll just use terminal and grant the privileges to this user.

 

I opened terminal and attempted to change the directory to get to Applications/XAMPP/xamppfile/bin and the prompt told me I was in bin. I then input mysql -h localhost -u root -p and I get a "command not found". Looking at the directory, this looks like the correct (executable) mysql application file. And searching on the web, I also found people that were accessing the mysql application in this directory. I have turned on Apache and Mysql using the XAMPP controls interface. Can someone tell me what's going on here? Thanks much in advance!

Cheers,

Rick

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.