J
jrq
Apologies for being really dumb today. I'm sure this is something
really basic.
I'm trying to open a connection to a MySQL database using mysql2 using
the following:
require "rubygems"
require "mysql2"
mysql = Mysql2::Client.new
host => 'localhost', :user =>
'user1',
assword => 'XXXX', :database => 'www_wpportal')
res = mysql.query("select * from contact_tag")
But I keep getting this message when I run it:
/usr/local/lib/ruby/gems/1.8/gems/mysql2-0.2.4/lib/mysql2/client.rb:
36:in `connect': Access denied for user 'root'@'localhost' (using
password: YES) (Mysql2::Error)
I don't understand where it's getting the "root@localhost" from.
Any assistance greatly appreciated.
really basic.
I'm trying to open a connection to a MySQL database using mysql2 using
the following:
require "rubygems"
require "mysql2"
mysql = Mysql2::Client.new
'user1',
res = mysql.query("select * from contact_tag")
But I keep getting this message when I run it:
/usr/local/lib/ruby/gems/1.8/gems/mysql2-0.2.4/lib/mysql2/client.rb:
36:in `connect': Access denied for user 'root'@'localhost' (using
password: YES) (Mysql2::Error)
I don't understand where it's getting the "root@localhost" from.
Any assistance greatly appreciated.