Leo
Leo

Reputation: 2103

Mysql2::Error: Can't connect to MySQL server on '127.0.0.1' (61)

I have a really strange issue, since i have my thinking sphinx app giving me this error everytime i try to use search method. But i know, and i know it for sure that it USED TO work properly. i pushed it, working version on github, and left it on my computer. Then, after couple of weeks i returned but its no longer working, giving me error above. i have read similar SO topics, but they are not really giving me any helpful answer. And yes, i am completely sure mysql server is up and running

thinking_sphinx.yml

development:
  enable_star: true
  min_prefix_len: 1

database.yml:

development:
  adapter: mysql2
  encoding: utf8
  database: wyszukiwarka
  pool: 5
  username: root
  host: 127.0.0.1

test:
  adapter: sqlite3
  database: db/test.sqlite3
  pool: 5
  timeout: 5000

production:
  adapter: sqlite3
  database: db/production.sqlite3
  pool: 5
  timeout: 5000

in case anybody would like to take a look, here's this (previously working) app on my github account. Shame on me because commits are not in english, but the whole thing is very simple, one view and stuff: https://github.com/Sphaerus/wyszukiwarka

Upvotes: 2

Views: 3985

Answers (1)

NM Pennypacker
NM Pennypacker

Reputation: 6942

I've run into this before and this worked for me. Try running.

rake ts:restart

And then restart your mysql.server

Upvotes: 1

Related Questions