Tom Dell''Aringa
2005-Oct-13 12:44 UTC
Re: mySQL command line within rails - access denied?
-- Alex Young <alex-qV/boFbD8Meu8LGVeLuP/g@public.gmane.org> wrote:><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< > You need to set up your permissions in MySQL correctly, and then use > them properly. If it''s a brand-new install, the following should work: ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><It is a brand new install.><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< > c:\work\depot> mysql -u root depot_development < db/create.sql > > *AS LONG AS* there''s a ''create database depot_development;'' line in > db/create.sql. The .yml file isn''t used for this step, so you can > forget about it for now. ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><That line is not in the sql file - it''s only the create table statements. (The book didn''t say to put the create db statement in)...><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>< > The above only works because a fresh install of MySQL has no root > password. Obviously it''s a bad idea to leave it like that, so check > http://dev.mysql.com/doc/refman/4.1/en/default-privileges.html for the > details of how to fix it. ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><Hmm..but I think root does have a pw - I set a password during the mySQL configuration. When I try to login w/no pw I get: C:\>mysql -u root ERROR 1045: Access denied for user ''root''@''localhost'' (using password: NO) I then tried: C:\>mysql -u root -p and it asked my my PW, which I entered (the one I set up during install) but it says Enter password: ********* ERROR 1251: Client does not support authentication protocol requested by server; consider upgrading MySQL client I''m on the latest mySQL 4.1. I read the page you sent about resetting passwords, I just want to make sure I don''t screw what I already setup by resetting the root PW. I can log in as one of the anonymous accounts (''dave'') set up in the yml with no password. But that doesn''t allow me to run that sql script. Sorry for the dumb questions, I''m new to a lot of this.. Tom http://www.pixelmech.com/ A man spoke frantically into the phone: "My wife is pregnant and her contractions are only two minutes apart"! "Is this her first child?" the doctor asked. "No, you idiot!" the man shouted. "This is her husband!" Q: What do you call a muddy chicken who crossed the road two times? A: A dirty double crosser...