On my RoR server (which I don’t have root access to) there are two
instances of mysql (4.0.x and 5.0.x). My database has been created in
the 5.0.x instance - I can log in manually OK (so I’ve got the correct
username and passowrd) but my RoR keeps getting denied access.
I think it may be a path issue - what do I need to do to point Ruby at
the right instance of mysql? I assume it is config/database.yaml but
I’m not sure what to add or change.
I think it may be a path issue - what do I need to do to point
Ruby at
the right instance of mysql? I assume it is config/database.yaml but
I’m not sure what to add or change.
It’s going to either be the port on which you connect to the mysql
server or the path to the socket file.
when you say you can log in locally what are you using to log in.
command line mysql or a client like cocoamysql?
try using tobyr as username and 127.0.0.1 as host instead of localhost
OK, I found the “port: XXXX” config setting, but unfortunately it didn’t
fix the problem. The strange thing is, regardless of the port setting
I seem to get the same error message - I would have assumed that using a
bogus port number would give a different error message …
regards
Toby
Toby R. wrote:
Hi Fred,
Sounds promising - how do I tell Ruby which port to use? (There
appears to be just one ‘mysql.sock’, in /tmp/mysl.sock, and that’s what
the database.yaml is already pointing at).
/toby
Frederick C. wrote:
On 8 Nov 2007, at 17:52, Toby R. wrote:
(Mysql::Error)
I think it may be a path issue - what do I need to do to point
Ruby at
the right instance of mysql? I assume it is config/database.yaml but
I’m not sure what to add or change.
It’s going to either be the port on which you connect to the mysql
server or the path to the socket file.
Hi Fred,
Sounds promising - how do I tell Ruby which port to use? (There
appears to be just one ‘mysql.sock’, in /tmp/mysl.sock, and that’s what
the database.yaml is already pointing at).
/toby
Frederick C. wrote:
On 8 Nov 2007, at 17:52, Toby R. wrote:
(Mysql::Error)
I think it may be a path issue - what do I need to do to point
Ruby at
the right instance of mysql? I assume it is config/database.yaml but
I’m not sure what to add or change.
It’s going to either be the port on which you connect to the mysql
server or the path to the socket file.
bash-2.05$ /usr/local/mysql-5.0.22/bin/mysql -u tobyr -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 41 to server version: 5.0.22-log
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql>
…
Tried with “host: 127.0.0.1” but no joy. Thanks for the suggestion
though.
/toby
Adam J. wrote:
when you say you can log in locally what are you using to log in.
command line mysql or a client like cocoamysql?
try using tobyr as username and 127.0.0.1 as host instead of localhost
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.