brian.barto-IW2WV5XWFqFOfGLsdRflZUB+6BGkLq7r@public.gmane.org
2005-Jul-26 14:37 UTC
MySQL permissions help
Hi all. New to the list. I''m running OS X with the lastest versions of mysql, ruby, and rails. My problem has to do mostly with MySQL permissions. Basically I can''t access any database after I create it. Not from the command line or from CocoaMySQL. The following is an example of the problem I am having from the command line. Any ideas on what I am doing wrong? ******** [Barto:~/Desktop/work/depot] brian> mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 51 to server version: 4.1.13-standard Type ''help;'' or ''\h'' for help. Type ''\c'' to clear the buffer. mysql> create database depot_development; Query OK, 1 row affected (0.00 sec) mysql> grant all on depot_development.* to ''brian''@''localhost'' <mailto:''brian''@''localhost''> ; Query OK, 0 rows affected (0.00 sec) mysql> quit Bye [Barto:~/Desktop/work/depot] brian> mysql depot_development <db/create.sql ERROR 1045 (28000): Access denied for user ''brian''@''localhost'' <mailto:''brian''@''localhost''> (using password: NO) [Barto:~/Desktop/work/depot] brian> ********* If it helps any, I am following the depot application straight from the book ''Agile Web Development with Rails'' _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
> mysql> grant all on depot_development.* to ''brian''@''localhost''; > Query OK, 0 rows affected (0.00 sec) > > mysql> quit > Bye > [Barto:~/Desktop/work/depot] brian> mysql depot_development <db/create.sql > ERROR 1045 (28000): Access denied for user ''brian''@''localhost'' (using > password: NO)mysql -ubrian depot_development < db/create.sql or, use a password when you grant the permissions: grant all on depot_development.* to ''brian''@''localhost'' identified by ''mypassword''; mysql -ubrian -pmypassword depot_development < db/create.sql Cheers, Ben Myles RailsAppHosting www.railsapphosting.com