after successfully installing everything as described in this article: http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger i attempted the final step in the process of removing the two anonymous accounts for my new mysql install, and to assign a password to the administrator account. however, when following the advised commands below: shell> mysql -u root mysql> DELETE FROM mysql.user WHERE User = ''''; mysql> FLUSH PRIVILEGES; as described here: http://dev.mysql.com/doc/refman/4.1/en/default-privileges.html i get the following response from my os x terminal: -bash: mysql: command not found can anyone tell me what i''m doing wrong? any help would be most appreciated. thanks, tyler young -- Posted via http://www.ruby-forum.com/.
tyler young wrote:> i get the following response from my os x terminal: > > -bash: mysql: command not foundTry "/usr/local/mysql/bin/mysql". -- Posted via http://www.ruby-forum.com/.
how about u try adding export PATH="${PATH}:/usr/local/mysql/bin" to your .profile or .bash_profile .... depending on what your flavor is... and dont forget to grab a new shell after you save that change... chris On 09/01/06, Andreas S. <f@andreas-s.net> wrote:> tyler young wrote: > > i get the following response from my os x terminal: > > > > -bash: mysql: command not found > > Try "/usr/local/mysql/bin/mysql". > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Andreas S. wrote:> Try "/usr/local/mysql/bin/mysql".awesome, andreas. thank you so much for your help. i have been able to connect to mysql using your path recommendation. however, when i initiate the first of the following two commands: mysql> DELETE FROM mysql.user WHERE User = ''''; i recieve an error: ERROR 1044 (42000): Access denied for user ''''@''localhost'' to database ''mysql'' sorry if i''m missing something really simple here, (like the path above), but the command line environment is so foreign to me, i''m not clear where a command line is strictly syntax, and where i can actually declare things (like path, or user name) etc. these being anonymous accounts i''m trying to delete, it makes sense to me that the user name would be empty, as shown above. however, i''m unclear on why my access was denied. if it were a simple matter of administrator privileges, i''d have been prompted to enter my password in the terminal, right? i have to catch some shut-eye right now, but i''m really looking forward to a) solving this, my first command-line problem, and b) learning more about this exciting new environment. i really appreciate having communities like this one to help me along the way. -- Posted via http://www.ruby-forum.com/.
Chris Lowder wrote:> how about u try adding > > export PATH="${PATH}:/usr/local/mysql/bin" > > to your .profile or .bash_profile .... depending on what your flavor > is... and dont forget to grab a new shell after you save that > change... > > chrischris, it looks like i was writing at the same time you were. i''ll try your solution for sure, but i have to ask, and let me say how silly i feel at having to ask these things, but admittedly, i''m about 30 minutes into my journey with rails, ruby, mysql, shells, and command-lines. :) the thing is, i''m using textwrangler on my machine. the instructions i followed to modify the path in my .bash_profile didn''t really work for me: i used ''twdiff'' to invoke textwrangler from the terminal, and it was supposed to open either a) the existing .bash_profile, or b) an empty document where i could add a path to the document, save it, and move on. what i received instead was a print out of sorts, from within the terminal-no launch of textwrangler, and no file to modify or otherwise save. so, i created a file with textwrangler, added the path described in the install information, and saved it in my home directory. trying to call up the otherwise invisible .bash_profile with the terminal still does not work for me. so i don''t know how i can modify the file to include your export path. and one last thing: by grabbing a new shell, do you mean quitting the terminal and restarting it? -- Posted via http://www.ruby-forum.com/.
tyler young <tyler@...> writes:> mysql> DELETE FROM mysql.user WHERE User = ''''; > > i recieve an error: > > ERROR 1044 (42000): Access denied for user '''' <at> ''localhost'' to database > ''mysql'' > > if it were a simple matter of administrator privileges, i''d have been > prompted to enter my password in the terminal, right?no. first of all, add /usr/local/mysql/bin into your .bash_login (or wherever) export PATH statement so you don''t have to type the full path. Make sure to either open a new shell or do source ~/.bash_login to read in the new settings (if you are using bash). secondly, when you start mysql client, do it like this: mysql -uroot Then you will be the root user and have privileges. As you read about on the mysql site, the starting root user has no password. If you do mysql -uroot -p and then hit enter, you''ll see: Enter password: Since there is none currently, can just hit enter. Other options are available via "man mysql" on your local system or through googling. http://www.google.com/search?q=mysql+man+page&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official -damon http://damonclinkscales.com/
im sing textmate at the moment so im not to sure how to do this with textwrangler... if worst comes to worst you can always download a trail of textmate here... http://macromates.com/textmate/files/TextMate_1.5.dmg 1. in your home directory (by default you are in this when you first launch a new shell) type ''mate .bash_profile'' without the qoutes... 2. this should either open the existing or a new file (like u said) to which you can add export PATH="${PATH}:/usr/local/mysql/bin" 3. save your file, and get a new shell (applebutton + N)... or yeah you can just quit and restart terminal... and that should be it... im not sure what the go is with that ''print out'' that your getting... im still a n00b at this stuff too... good luck with it, chris On 09/01/06, tyler young <tyler@meantangerine.com> wrote:> Chris Lowder wrote: > > how about u try adding > > > > export PATH="${PATH}:/usr/local/mysql/bin" > > > > to your .profile or .bash_profile .... depending on what your flavor > > is... and dont forget to grab a new shell after you save that > > change... > > > > chris > > > chris, > > it looks like i was writing at the same time you were. i''ll try your > solution for sure, but i have to ask, and let me say how silly i feel at > having to ask these things, but admittedly, i''m about 30 minutes into my > journey with rails, ruby, mysql, shells, and command-lines. :) > > the thing is, i''m using textwrangler on my machine. the instructions i > followed to modify the path in my .bash_profile didn''t really work for > me: i used ''twdiff'' to invoke textwrangler from the terminal, and it was > supposed to open either a) the existing .bash_profile, or b) an empty > document where i could add a path to the document, save it, and move on. > > what i received instead was a print out of sorts, from within the > terminal-no launch of textwrangler, and no file to modify or otherwise > save. so, i created a file with textwrangler, added the path described > in the install information, and saved it in my home directory. > > trying to call up the otherwise invisible .bash_profile with the > terminal still does not work for me. so i don''t know how i can modify > the file to include your export path. > > and one last thing: by grabbing a new shell, do you mean quitting the > terminal and restarting it? > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >