I''m trying to run " rake db:migrate " and im getting an error back: ------------------------------------------------------------------------ C:\wamp\www\demoproject>rake db:migrate (in C:/wamp/www/demoproject) rake aborted! Mysql::Error: query: not connected: CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB (See full trace by running task with --trace) ------------------------------------------------------------------------ Something is definitely wrong because when I try to run " script/dbconsole " i get an error also ------------------------------------------------------------------------ C:\wamp\www\demoproject>ruby script/dbconsole Couldn''t find database client: mysql, mysql5. Check your $PATH and try again. ------------------------------------------------------------------------ I have been fighting to get RoR installed for almost 2 weeks and my patience and time is running low. This is as bad as when I first installed apache, mysql and php on my system 7 years ago. I would gladly pay for an installer that just made everything work! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Following info would help to know on giving you an idea of what to try next: What OS are you on? How did you install Mysql? Is Mysql service running? Copy your database.yml On 2 July 2010 11:42, Dave Digital <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I''m trying to run " rake db:migrate " and im getting an error back: > > ------------------------------------------------------------------------ > > C:\wamp\www\demoproject>rake db:migrate > (in C:/wamp/www/demoproject) > rake aborted! > Mysql::Error: query: not connected: CREATE TABLE `schema_migrations` > (`version` > varchar(255) NOT NULL) ENGINE=InnoDB > > (See full trace by running task with --trace) > > ------------------------------------------------------------------------ > > Something is definitely wrong because when I try to run " > script/dbconsole " i get an error also > > ------------------------------------------------------------------------ > > C:\wamp\www\demoproject>ruby script/dbconsole > Couldn''t find database client: mysql, mysql5. Check your $PATH and try > again. > > ------------------------------------------------------------------------ > > I have been fighting to get RoR installed for almost 2 weeks and my > patience and time is running low. This is as bad as when I first > installed apache, mysql and php on my system 7 years ago. I would gladly > pay for an installer that just made everything work! > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I''m running on Vista 32bit (VMware Fusion). I installed MySQL with WAMP. Yes the mysql service is running. database.yml ------------------------------------------------------------------------ development: adapter: mysql database: music_library_development pool: 5 timeout: 5000 host: localhost test: adapter: mysql database: music_library_test pool: 5 timeout: 5000 host: localhost production: adapter: mysql database: music_library_production pool: 5 timeout: 5000 host: localhost -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi - Here are some ideas - at least will be a start at isolating the problem. I am on a Mac so things might not be exact. 1) Here is an example of working database.yml which is working with mysql. You may want to track down the differences and if they are meaningful. Also, if you have not done, create a test rails app in cmd prompt using: rails testapp -d mysql. This should autogenerate a (potentially) correct database.yml development: adapter: mysql encoding: utf8 reconnect: false database: xxx_development pool: 5 username: root password: socket: /tmp/mysql.sock 2) See if you can log in and access mysql. On a mac I do something in the terminal like: mysql -u [user name] -p [password]. Check out this article http://dev.mysql.com/doc/refman/5.0/en/windows-start-command-line.html. Once you get in see if you can create a db. On 2 July 2010 12:02, Dave Digital <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I''m running on Vista 32bit (VMware Fusion). > > I installed MySQL with WAMP. > > Yes the mysql service is running. > > > database.yml > ------------------------------------------------------------------------ > > development: > adapter: mysql > database: music_library_development > pool: 5 > timeout: 5000 > host: localhost > > test: > adapter: mysql > database: music_library_test > pool: 5 > timeout: 5000 > host: localhost > > production: > adapter: mysql > database: music_library_production > pool: 5 > timeout: 5000 > host: localhost > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jul 2, 2010, at 12:14 PM, DK wrote:> Hi - > Here are some ideas - at least will be a start at isolating the > problem. I am on a Mac so things might not be exact. > > 1) Here is an example of working database.yml which is working with > mysql. You may want to track down the differences and if they are > meaningful. > > Also, if you have not done, create a test rails app in cmd prompt > using: rails testapp -d mysql. This should autogenerate a > (potentially) correct database.yml > > development: > adapter: mysql > encoding: utf8 > reconnect: false > database: xxx_development > pool: 5 > username: root > password: > socket: /tmp/mysql.sock > > 2) See if you can log in and access mysql. On a mac I do something > in the terminal like: mysql -u [user name] -p [password]. Check out > this article http://dev.mysql.com/doc/refman/5.0/en/windows-start-command-line.html > . Once you get in see if you can create a db. > > On 2 July 2010 12:02, Dave Digital <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > I''m running on Vista 32bit (VMware Fusion). > > I installed MySQL with WAMP. > > Yes the mysql service is running. > > > database.yml > ------------------------------------------------------------------------ > > development: > adapter: mysql > database: music_library_development > pool: 5 > timeout: 5000 > host: localhostIn case the "hints" are too subtle, I suspect you took the example and fixed sqlite3 => mysql and set your database name. Since SQLite doesn''t need username/password, you didn''t have those in the example. Put them in and you''re probably going to be all set. -Rob Rob Biedenharn Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org http://AgileConsultingLLC.com/ rab-/VpnD74mH8+00s0LW7PaslaTQe2KTcn/@public.gmane.org http://GaslightSoftware.com/> > test: > adapter: mysql > database: music_library_test > pool: 5 > timeout: 5000 > host: localhost > > production: > adapter: mysql > database: music_library_production > pool: 5 > timeout: 5000 > host: localhost-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I''m able to log in to MySQL and CRUD databases easily with PHPMyAdmin. WAMP on Windows makes sure of this. I tried your command for creating a test rails app in cmd and created a new database. I still get the same error. Like I mentioned in my original post, when I run ruby script/dbconsole it gives me an error that it cannot find mysql client. So I think the problem is beyond my database.yml config. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rob Biedenharn wrote:> In case the "hints" are too subtle, I suspect you took the example and > fixed sqlite3 => mysql and set your database name. Since SQLite > doesn''t need username/password, you didn''t have those in the example. > Put them in and you''re probably going to be all set.I''m not using SQLite, I have MySQL installed. I''m not getting permission or login errors so I don''t see how that is relavant with an error like this Mysql::Error: query: not connected: CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jul 2, 2010, at 12:46 PM, Dave Digital wrote:> Rob Biedenharn wrote: >> In case the "hints" are too subtle, I suspect you took the example >> and >> fixed sqlite3 => mysql and set your database name. Since SQLite >> doesn''t need username/password, you didn''t have those in the example. >> Put them in and you''re probably going to be all set. > > I''m not using SQLite, I have MySQL installed. I''m not getting > permission > or login errors so I don''t see how that is relavant with an error like > this > > Mysql::Error: query: not connected: CREATE TABLE `schema_migrations` > (`version` > varchar(255) NOT NULL) ENGINE=InnoDBWell, I''m taking "not connected" to indicate something that''s not too different from a login error. database.yml ------------------------------------------------------------------------ development: adapter: mysql database: music_library_development pool: 5 timeout: 5000 host: localhost In your database.yml, there are no login credentials. Assuming that you can get connected (logged in) to your mysql with absolutely no user or password, maybe this is right, but I doubt it. If your root user doesn''t have a password, try this: development: adapter: mysql database: music_library_development username: root password: pool: 5 timeout: 5000 host: localhost (Note that there should be two spaces on the indented lines.) If you have some other username/password, use those. In any case, you should be able to connect with: mysql -u root mysql -u root -p > then type the root user''s password mysql -u yourusername -p > then type yourpassword How does that work for you? -Rob Rob Biedenharn Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org http://AgileConsultingLLC.com/ rab-/VpnD74mH8+00s0LW7PaslaTQe2KTcn/@public.gmane.org http://GaslightSoftware.com/ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> development: > adapter: mysql > database: music_library_development > username: root > password: > pool: 5 > timeout: 5000 > host: localhost > > (Note that there should be two spaces on the indented lines.) > > If you have some other username/password, use those. In any case, you > should be able to connect with: > mysql -u root > mysql -u root -p > > then type the root user''s password > mysql -u yourusername -p > > then type yourpassword > > How does that work for you? > > -Rob > > Rob Biedenharn > Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org http://AgileConsultingLLC.com/ > rab-/VpnD74mH8+00s0LW7PaslaTQe2KTcn/@public.gmane.org http://GaslightSoftware.com/I set my database.yml to this development: adapter: mysql encoding: utf8 reconnect: false database: testapp_development pool: 5 username: root password: host: localhost And still no luck. There is a larger issue here and not something as simple as passwords. I''ve been fighting this for weeks. My love of rails is turning to hate. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2010-Jul-02 18:25 UTC
Re: Re: Re: MySQL not Connected ...... *pull hair*
Dave Digital wrote: [...]> And still no luck. There is a larger issue here and not something as > simple as passwords. I''ve been fighting this for weeks. My love of rails > is turning to hate.This is probably not a Rails issue as such, so don''t start hating Rails just yet. More stuff to try: * Do you have the mysql gem installed? (It looks like you do, but...) * What version of MySQL are you running? (Some people have reported problems with 5.1; you may want to switch to 5.0.) If it were my development setup, though, I''d avoid both MySQL and Windows entirely. I don''t use Windows, but my understanding is that besides its being a pretty bad OS in general, a lot of Rails tools run less smoothly on it than on *nix (you can use a *nix VM, though). Likewise, MySQL is a pretty bad DB in comparison to systems like PostgreSQL. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
And to chime in... I have same experience that Windows is a suboptimal environment, if not only from the fact that it 90% of the advice for Rails online is referring to *nix (including mac). I would also recommend getting up a simple Ubuntu vm. I tried configuring a Windows Server 2008 recently for rails production env and it was 3 days of complete hell. I had the whole thing done on Ubuntu server in about 1/2 day. Not that I had the same issue as you with the db. Either that or just install InstantRails for Windows and get productive.... you can always learn to do the install later. On 2 July 2010 14:25, Marnen Laibow-Koser <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Dave Digital wrote: > [...] > > And still no luck. There is a larger issue here and not something as > > simple as passwords. I''ve been fighting this for weeks. My love of rails > > is turning to hate. > > This is probably not a Rails issue as such, so don''t start hating Rails > just yet. > > More stuff to try: > > * Do you have the mysql gem installed? (It looks like you do, but...) > * What version of MySQL are you running? (Some people have reported > problems with 5.1; you may want to switch to 5.0.) > > If it were my development setup, though, I''d avoid both MySQL and > Windows entirely. I don''t use Windows, but my understanding is that > besides its being a pretty bad OS in general, a lot of Rails tools run > less smoothly on it than on *nix (you can use a *nix VM, though). > Likewise, MySQL is a pretty bad DB in comparison to systems like > PostgreSQL. > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Steve Spiller
2010-Jul-02 19:28 UTC
Re: Re: Re: Re: MySQL not Connected ...... *pull hair*
I''m not sure if this is relevant but here goes. You said you are running Vista 32bit (VMware Fusion) - what is running in VMWare fusion? Vista or something like VirtualRails? I have something similar at home - run Ubuntu as my main OS, but have a full webserver VirtualBox to reduce the number of unneeded processes running (only fire up the webserver vm when actually needed). My host OS does not have rails, MySQL client/server or gem installed at all. The Rails source is in the VM, linked to a directory on my main os by sshfs. If I need to run any ruby, rails or MySQL command, it has to be run from the web vm cli, NOT the hosts. For example, running "script/dbconsole" in a host cli box I get all sorts of horrible error messages, but it works as intended when run from a cli from the VM. What I think I''m saying is - if your rails dev environment is in a VM, use the resources of the VM to run Rails/MySQL tasks, not the hosts. HTH On 2 July 2010 19:54, DK <dk.kahn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> And to chime in... I have same experience that Windows is a suboptimal > environment, if not only from the fact that it 90% of the advice for Rails > online is referring to *nix (including mac). I would also recommend getting > up a simple Ubuntu vm. I tried configuring a Windows Server 2008 recently > for rails production env and it was 3 days of complete hell. I had the whole > thing done on Ubuntu server in about 1/2 day. Not that I had the same issue > as you with the db. > > Either that or just install InstantRails for Windows and get productive.... > you can always learn to do the install later. > > > On 2 July 2010 14:25, Marnen Laibow-Koser <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > >> Dave Digital wrote: >> [...] >> > And still no luck. There is a larger issue here and not something as >> > simple as passwords. I''ve been fighting this for weeks. My love of rails >> > is turning to hate. >> >> This is probably not a Rails issue as such, so don''t start hating Rails >> just yet. >> >> More stuff to try: >> >> * Do you have the mysql gem installed? (It looks like you do, but...) >> * What version of MySQL are you running? (Some people have reported >> problems with 5.1; you may want to switch to 5.0.) >> >> If it were my development setup, though, I''d avoid both MySQL and >> Windows entirely. I don''t use Windows, but my understanding is that >> besides its being a pretty bad OS in general, a lot of Rails tools run >> less smoothly on it than on *nix (you can use a *nix VM, though). >> Likewise, MySQL is a pretty bad DB in comparison to systems like >> PostgreSQL. >> >> Best, >> -- >> Marnen Laibow-Koser >> http://www.marnen.org >> marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org >> -- >> Posted via http://www.ruby-forum.com/. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> As you are running an uncommon environment I would suspect your socket is not where you expect it. Try adding the line:<br> socket: /tmp/mysqld.sock<br> or <br> socket: /tmp/msql.sock<br> to your database.yml. One of those might work.<br> <br> Norm<br> <br> </body> </html> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.<br /> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org<br /> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org<br /> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.<br />
Hassan Schroeder
2010-Jul-02 20:37 UTC
Re: Re: Re: Re: MySQL not Connected ...... *pull hair*
On Fri, Jul 2, 2010 at 1:29 PM, Norm Scherer <normscherer-ihVZJaRskl1bRRN4PJnoQQ@public.gmane.org> wrote:> As you are running an uncommon environment I would suspect your socket is > not where you expect it. Try adding the line: > socket: /tmp/mysqld.sock > or > socket: /tmp/msql.sock > to your database.yml. One of those might work.Sigh. Chanting over chicken bones *might* work, too. How about, instead, use the tools at hand to *find* what you need to know :-) ripple:~$ mysqladmin variables | grep socket | socket | /tmp/mysql.sock | ripple:~$ -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Michael Pavling
2010-Jul-02 20:40 UTC
Re: Re: Re: Re: MySQL not Connected ...... *pull hair*
On 2 July 2010 21:37, Hassan Schroeder <hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Fri, Jul 2, 2010 at 1:29 PM, Norm Scherer <normscherer-ihVZJaRskl1bRRN4PJnoQQ@public.gmane.org> wrote: >> As you are running an uncommon environment I would suspect your socket is >> not where you expect it. Try adding the line: >> socket: /tmp/mysqld.sock >> or >> socket: /tmp/msql.sock >> to your database.yml. One of those might work. > > Sigh. Chanting over chicken bones *might* work, too. How about, > instead, use the tools at hand to *find* what you need to know :-) > > ripple:~$ mysqladmin variables | grep socket > | socket | /tmp/mysql.sockYou''ll both have to chant differently than that to get the Windows deity to hear... given that''s the OP''s OS ;-) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hassan Schroeder
2010-Jul-02 20:49 UTC
Re: Re: Re: Re: MySQL not Connected ...... *pull hair*
On Fri, Jul 2, 2010 at 1:40 PM, Michael Pavling <pavling-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:>> ripple:~$ mysqladmin variables | grep socket >> | socket | /tmp/mysql.sock > > You''ll both have to chant differently than that to get the Windows > deity to hear... given that''s the OP''s OS ;-)Ah, point taken, but hopefully mysqladmin works on Windows, too, so you at least get easy access to those variables. Hopefully. Just realized I seriously have no idea :-) -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hopefully your answer is in this thread. http://forums.aptana.com/viewtopic.php?f=20&t=7563&p=27407&hilit=libmysql.dll#p27407 one quick q: did u install mysql after installing ror ? -thanks Dave Digital wrote:> I''m able to log in to MySQL and CRUD databases easily with PHPMyAdmin. > WAMP on Windows makes sure of this. > > I tried your command for creating a test rails app in cmd and created a > new database. I still get the same error. > > Like I mentioned in my original post, when I run ruby script/dbconsole > it gives me an error that it cannot find mysql client. So I think the > problem is beyond my database.yml config.-- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Update to the post: Since the error says "cannot find mysql client", follow these... - download older MySQL client library, for example one from InstantRails: http://instantrails.rubyforge.org/svn/t ... bmySQL.dll - copy the downloaded file to C:\Ruby\bin (or wherever you installed Ruby) - restart MySQL server src: > http://forums.aptana.com/viewtopic.php?f=20&t=7563&p=27407&hilit=libmysql.dll#p27407 RailsFan Radha wrote:> Hopefully your answer is in this thread. > http://forums.aptana.com/viewtopic.php?f=20&t=7563&p=27407&hilit=libmysql.dll#p27407 > > one quick q: > did u install mysql after installing ror ? > > -thanks > > > Dave Digital wrote: >> I''m able to log in to MySQL and CRUD databases easily with PHPMyAdmin. >> WAMP on Windows makes sure of this. >> >> I tried your command for creating a test rails app in cmd and created a >> new database. I still get the same error. >> >> Like I mentioned in my original post, when I run ruby script/dbconsole >> it gives me an error that it cannot find mysql client. So I think the >> problem is beyond my database.yml config.-- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
looks like the link didn''t get thru.. here it is http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll RailsFan Radha wrote:> Update to the post: > Since the error says "cannot find mysql client", follow these... > - download older MySQL client library, for example one from > InstantRails: http://instantrails.rubyforge.org/svn/t ... bmySQL.dll > > - copy the downloaded file to C:\Ruby\bin (or wherever you installed > Ruby) > > - restart MySQL server > > > src: > > http://forums.aptana.com/viewtopic.php?f=20&t=7563&p=27407&hilit=libmysql.dll#p27407 > > RailsFan Radha wrote: >> Hopefully your answer is in this thread. >> http://forums.aptana.com/viewtopic.php?f=20&t=7563&p=27407&hilit=libmysql.dll#p27407 >> >> one quick q: >> did u install mysql after installing ror ? >> >> -thanks-- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Sure get a Mac ;) No but seriously first there''s no reason why your app should be in the www folder the only thing you want to expose to the world is he public folder and you can do that by simlinking I don''t know what the equivalent is on windows well I don''t know why anyone does web dev on a non unix Linux environnment but I''ve seen weirder things... Also you''ll need phusion passenger to get your ruby working with apache. If you want a prepackaged server stack look into http://bitnami.org/ I got them working on my win 7 box of failure (does my bias come through ?) but before you do all that you should know that you don''t need a separate server to develop your ruby rails app. Rails come with it''s own server you can use while developing... Cheers Victor On Jul 2, 11:42 am, Dave Digital <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I''m trying to run " rake db:migrate " and im getting an error back: > > ------------------------------------------------------------------------ > > C:\wamp\www\demoproject>rake db:migrate > (in C:/wamp/www/demoproject) > rake aborted! > Mysql::Error: query: not connected: CREATE TABLE `schema_migrations` > (`version` > varchar(255) NOT NULL) ENGINE=InnoDB > > (See full trace by running task with --trace) > > ------------------------------------------------------------------------ > > Something is definitely wrong because when I try to run " > script/dbconsole " i get an error also > > ------------------------------------------------------------------------ > > C:\wamp\www\demoproject>ruby script/dbconsole > Couldn''t find database client: mysql, mysql5. Check your $PATH and try > again. > > ------------------------------------------------------------------------ > > I have been fighting to get RoR installed for almost 2 weeks and my > patience and time is running low. This is as bad as when I first > installed apache, mysql and php on my system 7 years ago. I would gladly > pay for an installer that just made everything work! > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Also as someone mentioned already. You want to keep an eye on the mysqlserver socket... But if your just working on local to develop screw mysql use sqlite3 and just use mysql on production... Which hopefully is not an iis server... On Jul 2, 11:42 am, Dave Digital <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I''m trying to run " rake db:migrate " and im getting an error back: > > ------------------------------------------------------------------------ > > C:\wamp\www\demoproject>rake db:migrate > (in C:/wamp/www/demoproject) > rake aborted! > Mysql::Error: query: not connected: CREATE TABLE `schema_migrations` > (`version` > varchar(255) NOT NULL) ENGINE=InnoDB > > (See full trace by running task with --trace) > > ------------------------------------------------------------------------ > > Something is definitely wrong because when I try to run " > script/dbconsole " i get an error also > > ------------------------------------------------------------------------ > > C:\wamp\www\demoproject>ruby script/dbconsole > Couldn''t find database client: mysql, mysql5. Check your $PATH and try > again. > > ------------------------------------------------------------------------ > > I have been fighting to get RoR installed for almost 2 weeks and my > patience and time is running low. This is as bad as when I first > installed apache, mysql and php on my system 7 years ago. I would gladly > pay for an installer that just made everything work! > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
RailsFan Radha wrote:> looks like the link didn''t get thru.. > here it is > http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dllI have the same problem. At the first time I used libmysql.dll file from my XAMPP directory but the problem still appears. Then I replace the file from the one from your link and it works flawlessly. This is my second day I''m trying installed Rails and this post just made me realize how lucky I am. Thanks you very much. Win7+XAMPP+Rails -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
RailsFan Radha wrote:> looks like the link didn''t get thru.. > here it is > http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dllI have the same problem. At the first time I used libmysql.dll file from my XAMPP directory but the problem still appears. Then I replace the file from the one from your link and it works flawlessly. This is the second day of me trying to install Rails and this post just made me realize how lucky I am. Thanks you very much! Win7+XAMPP+Rails -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.