MySQL Forums
Forum List  »  Ruby

Trouble with initial mysql configuration
Posted by: H.I. McDunnough
Date: October 10, 2005 11:29AM

I am using FC4 fully updated with yum. The first time I start mysqld, it runs mysql_install_db (I think) and displays:

...
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h linux password 'new-password'
See the manual for more instructions.
...

/usr/bin/mysqladmin -u root password 'new-password' => works fine

When I run "/usr/bin/mysqladmin -u root -h linux password 'new-password'", I receive:
/usr/bin/mysqladmin: connect to server at 'linux' failed
error: '#HY000Host 'localhost.localdomain' is not allowed to connect to this MySQL server'

When I login using "mysql -p" or "mysql -p -h localhost", I am able to login.

When I login using any of the following, I receive "ERROR 1130 (00000): #HY000Host 'localhost.localdomain' is not allowed to connect to this MySQL server":

mysql -p -h 127.0.0.1
mysql -p -h linux
mysql -p -h 192.168.1.3

[root@linux mysql]# netstat -anp |grep mysql
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2865/mysqld
unix 2 [ ACC ] STREAM LISTENING 24719 2865/mysqld /var/lib/mysql/mysql.sock

Why am I not able to use anything but localhost to login? The only reason I care about this is that I am having some trouble setting up Ruby on Rails. I had no trouble setting any of this up on FC3, but now Ruby on Rails cannot connect to my database no matter what host I enter. I am thinking this may be related. Even if it's not, I'd like to know why I can't connect to anything other than localhost. Thanks.

Options: ReplyQuote


Subject
Written By
Posted
Trouble with initial mysql configuration
October 10, 2005 11:29AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.