hi all, I am getting an error when trying to connect to a mysql server on my ''production'' linux server. The rails app works fine when connecting to the ''development'' mysql on my windows development server. I have looked at the following wiki: http://wiki.rubyonrails.com/rails/pages/Mysql+Connection+Problems/ and I installed the mysql gem, however this does not seem to have fixed the problem. The exact error message is as follows Mysql::Error: Lost connection to MySQL server during query: SELECT COUNT(*) FROM Orders The following is my list of installed gems on the production linux server. #gem list *** LOCAL GEMS *** actionmailer (1.2.0, 1.1.5) actionpack (1.12.0, 1.11.2) actionwebservice (1.1.0, 1.0.0) activerecord (1.14.0, 1.13.2) activesupport (1.3.0, 1.2.5) fcgi (0.8.6.1) mysql (2.7) rails (1.1.0, 1.0.0) rake (0.7.0) sources (0.0.1) The production server is running FC4. I can connect to the production mysql server using the username and password supplied in the rails app. Don''t know if its relevant, but the webserver is running lighttpd. Any Ideas? Thanks, ~Ben -- Posted via http://www.ruby-forum.com/.
On Mon, 2006-04-03 at 09:19 +0200, Ben Lewis wrote:> hi all, > > I am getting an error when trying to connect to a mysql server on my > ''production'' linux server. The rails app works fine when connecting to > the ''development'' mysql on my windows development server. > > I have looked at the following wiki: > http://wiki.rubyonrails.com/rails/pages/Mysql+Connection+Problems/ > and I installed the mysql gem, however this does not seem to have fixed > the problem. > > The exact error message is as follows > Mysql::Error: Lost connection to MySQL server during query: SELECT > COUNT(*) FROM Orders > > The following is my list of installed gems on the production linux > server. > > #gem list > *** LOCAL GEMS *** > actionmailer (1.2.0, 1.1.5) > actionpack (1.12.0, 1.11.2) > actionwebservice (1.1.0, 1.0.0) > activerecord (1.14.0, 1.13.2) > activesupport (1.3.0, 1.2.5) > fcgi (0.8.6.1) > mysql (2.7) > rails (1.1.0, 1.0.0) > rake (0.7.0) > sources (0.0.1) > > The production server is running FC4. > > I can connect to the production mysql server using the username and > password supplied in the rails app. > > Don''t know if its relevant, but the webserver is running lighttpd. > > Any Ideas?---- 1 - did you install mysql gem on the fedora system? sudo gem install mysql 2 - did you fix for shift from Windows to Linux? cd /rails_root rake rails:update 3 - SELinux issues? look for errors in /var/log/messages - things about ''avc denied'' 4 - it''s only relevant about webserver and lighttpd if it''s not working. look for errors in /rails_root/log/production.log look for errors in /var/log/lighttpd/error_log Craig
> 1 - did you install mysql gem on the fedora system? > > sudo gem install mysqlYes> > 2 - did you fix for shift from Windows to Linux? > > cd /rails_root > rake rails:updateI don''t know what this achieves, but I get the following errors several hundred times. /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/inflections.rb:2: warning: ambiguous first argument; put parentheses or even spaces> 3 - SELinux issues? > > look for errors in /var/log/messages - things about ''avc denied''SELinux not enabled. No Errors in this log file.> 4 - it''s only relevant about webserver and lighttpd if it''s not working.Note - I only get this error using the production mysql server. The development mysql server works fine.> > look for errors in /rails_root/log/production.logNo Errors> look for errors in /var/log/lighttpd/error_logNo Errors -- Posted via http://www.ruby-forum.com/.
Copying mysql.so into \1.8\i386-mswin32\ solved "Lost connection to MySQL server" when connecting to remote server from XP. http://wiki.rubyonrails.com/rails/pages/HowToUseMySQLRubyBindingsOnWin32 On 4/3/06, Ben Lewis <ben@fearofpudding.com> wrote:> > > > 1 - did you install mysql gem on the fedora system? > > > > sudo gem install mysql > Yes > > > > > 2 - did you fix for shift from Windows to Linux? > > > > cd /rails_root > > rake rails:update > I don''t know what this achieves, but I get the following errors several > hundred times. > /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5 > /lib/active_support/inflections.rb:2: > warning: ambiguous first argument; put parentheses or even spaces > > > > 3 - SELinux issues? > > > > look for errors in /var/log/messages - things about ''avc denied'' > SELinux not enabled. No Errors in this log file. > > > 4 - it''s only relevant about webserver and lighttpd if it''s not working. > Note - I only get this error using the production mysql server. The > development mysql server works fine. > > > > look for errors in /rails_root/log/production.log > No Errors > > > look for errors in /var/log/lighttpd/error_log > No Errors > > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060404/e1acfc1d/attachment-0001.html