rick.emmet Posted December 22, 2012 Share Posted December 22, 2012 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 Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted December 22, 2012 Share Posted December 22, 2012 From within the directory , precede it with a dot and slash and see if that works: ./mysql -h localhost (etc.). Quote Link to comment Share on other sites More sharing options...
rick.emmet Posted December 22, 2012 Author Share Posted December 22, 2012 Hello Pikachu2000, That did the trick, thank you so much for the assistance!! I was expecting Terminal to behave just like cmd.exe once I got to the bin folder (I've never had to do that in the PC environment). Thanks again, Rick Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.