Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Jan 09, 2005 9:27 pm 
Offline
Senior Newbie
User avatar

Joined: Thu Dec 23, 2004 1:51 am
Posts: 8
Website: http://www.dishkuvek.org
AOL: C+Dishkuvek
Location: Richmond, VA
Just a quick one:

When setting up mysql, I can do this:

Code:
# mysqladmin -u root password '******'


But when I try to use a hostname in there, I get this:

Code:
# mysqladmin -u root -h example.host password '*****'
mysqladmin: connect to server at 'example.host' failed
error: 'Host 'example.host' is not allowed to connect to this MySQL server'


How might I get around this?


Top
   
 Post subject:
PostPosted: Mon Jan 10, 2005 12:09 am 
Offline
Junior Member
User avatar

Joined: Wed Aug 13, 2003 12:13 am
Posts: 29
Website: http://parazoid.net
AOL: maristgeek
Location: NY
It appears that mysql isn't running. The database server needs to be running in order to update a database.


Top
   
 Post subject:
PostPosted: Mon Jan 10, 2005 6:18 am 
Offline
Senior Member

Joined: Sat Apr 03, 2004 7:44 am
Posts: 64
ICQ: 2623399
... or the "mysql" database has to be updated giving the user "root" access from the host "example.host". Either do this with "GRANT" after you logged in the mysql client or use "mysqladmin":

Code:
# mysqladmin -u root -h "example.host" password 'new-password'


If you do not specify the -h option, then the password is set globally for the root account.


Top
   
 Post subject:
PostPosted: Mon Jan 10, 2005 2:16 pm 
Offline
Senior Newbie
User avatar

Joined: Thu Dec 23, 2004 1:51 am
Posts: 8
Website: http://www.dishkuvek.org
AOL: C+Dishkuvek
Location: Richmond, VA
jax wrote:
It appears that mysql isn't running. The database server needs to be running in order to update a database.


The thing is that the database server is running when I issue this command.


Top
   
 Post subject:
PostPosted: Mon Jan 10, 2005 4:41 pm 
Offline
Junior Member
User avatar

Joined: Wed Aug 13, 2003 12:13 am
Posts: 29
Website: http://parazoid.net
AOL: maristgeek
Location: NY
Sorry, read the first post wrong (I seem to do that frequently). If you take a look at the users table in the mysql database, you can specify different permissions to each user based on what host they logged in from. By default, root only has access to login from localhost. So, in order to specify anything else with -h, you first need to grant that access. Either manually insert a row into the table and flush the privileges, or refer to the mysql documentation to learn about GRANT.

http://dev.mysql.com/doc/mysql/en/Secure_GRANT.html


Top
   
 Post subject:
PostPosted: Mon Jan 10, 2005 7:19 pm 
Offline
Senior Member

Joined: Sat Apr 03, 2004 7:44 am
Posts: 64
ICQ: 2623399
has any of you read my reply above? :roll:


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group