I do not want to get the reputation as a spammer and be hated by the
ruby and rails community??!
But where are the best forums for help with rails and ruby please, and
which ones are the most user freindly?
I have a little tech problem:
I have a lap top running xp home service pack two
and I have installed ruby 1.8.2 and rails 1.0.0 I also have mysql
4.1.16-nt via tcp/ip running on the laptop, so all three pieces of
software are on the laptop.
Background :this version of mysql comes with a client, but unfortunately
the client does not talk to the server in its standard configuration
because the mysql server has enhansed security, so the new style
passwords are not understood if the client uses them, (which it does by
default). any way as you are may be aware you can change the password so
that the client can connect to the server… but that’s another story…
I have used SciTE to create a file called create .sql , this file is a
number of lines of sql to create a table. Now ordinarilly I would create
a table using Mysql Query browser to issue some lines of sql to create
the table making sure I use the correct datasbase of course, but this
time I am wanting to use the mysql client to execute the code in the
create.sql file which is in the db directory of my rails application.
so i type from the prompt
mysql depot_development <db/create.sql return
depot_development is the the database I want to put the table into, and
it was created previously by me.
I get back:
ERROR: 1045 <28000>: Access denied for user ‘ODBC’@‘localhost’
mysql error messages are sometimes confussing-- I think??
I wonder what’s going on, can any one help me please ta v much
Julian K Bowler
On 3/28/06, julian [email protected] wrote:
mysql depot_development <db/create.sql return
depot_development is the the database I want to put the table into, and it
was created previously by me.
I get back:
ERROR: 1045 <28000>: Access denied for user ‘ODBC’@‘localhost’
mysql error messages are sometimes confussing-- I think??
I wonder what’s going on, can any one help me please ta v much
“Access denied” seems pretty clear. Try telling the mysql client that
you want to log in.
$ mysql -u username -p databasename
It will prompt you for a password.
If you get in, then just type “source create.sql”.
Hi Julian,
julian wrote:
so i type from the prompt
mysql depot_development <db/create.sql return
depot_development is the the database I want to
put the table into, and it was created previously by me.
I get back:
ERROR: 1045 <28000>: Access denied for user
‘ODBC’@‘localhost’
The fix is to grant the user “ODBC” access rights to the database. The
way
you do this is as follows.
-
log in to mySQL as root. Open a Command Window, cd to the app
directory
(probably ‘depot’ in your case), and enter:
mysql -u root -p
Then just hit enter when prompted for the root password, or enter one if
you’ve set one up for the root user. -
enter the following line to grant access to the “ODBC” user
grant all on depot_development.* to ‘ODBC’@‘localhost’; -
enter the following line to exit
exit
The only other thing I see that may be contributing to your problem is
the
‘using password: NO’ part of the error message. If you still get the
error
message after making the change above, you may need to change the
password
field in your database.yml file. I just leave it blank for development
on
my desktop.
HTH,
Bill
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails
Hi,
julian <jkbowler@…> writes:
mysql depot_development <db/create.sql
…
ERROR: 1045 <28000>: Access denied for user
‘ODBC’ ‘localhost’
You probably must supply the MySQL client with a username and a
password. Use
the -u and -p options for this. For details see the MySQL documentation
at
http://dev.mysql.com/doc/refman/5.0/en/mysql-command-options.html
Regards