Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 12-13-2002, 11:46 PM   #1
Registered: Aug 2002
Posts: 189

Rep: Reputation: 30
How do I add a host user password to mysql server?

I have mysql server running on PC1 and need to access it from PC 2. When I try mysql -h -u mythtv from PC 2 I get:

Error 1130 Host '' is not allowed to connect to this MySQL server

Old 12-14-2002, 02:47 AM   #2
Senior Member
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
You need to grant the privileges like that:

GRANT Select, Insert, Update ON database.* TO 'mythtv'@'' IDENTIFIED BY 'password';

What privileges you give that user and on what database is in your hands of course ...
Old 12-15-2002, 12:56 AM   #3
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
I want to grant the user mythtv@ read write access to the database named mythconverg on the mysql server on using password mythtv. How do I do this?

I tried on the PC with the mysql server:

mysql mysql
msyql> grant all privileges on *.* to mythtv@ identified by 'mythtv' with grant on;
mysql> exit

This seemed to work last night and I was able to access
the database. However it doesnt work this morning. I get an Error 2003: Cant connect to Mysql server on '' (111) when I try to do a
user@localhost]mysql -h -u mythtv

If i append a -p at the end of that, it prompts me for a password and then shows me the error. So apparently I am able to access the mysql server but authentication fails.

If i try to access locally on the mysql server, I can access. Any ideas?
Old 12-16-2002, 10:57 AM   #4
Registered: Dec 2000
Location: Indiana
Distribution: Red Hat 7.3/Mandrake 8.2/9.0
Posts: 154

Rep: Reputation: 30
When it prompts you for the password aren you giving it the correct password?? Also, you may possibly need to add the user "mythtv@" to the USER table in the MYSQL database. After this you should grant the privileges you want and then you need to issue the command "flush privileges" OR restart the mysql server for the changes to take effect.
You could also just add the user "mythtv@%" to allow that user to connect from ANY host. All of this information is in the mySQL documentation as well.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add an user, without password?? cenzole Linux - Newbie 21 08-07-2013 06:58 PM
add a user with password without prompt grendel-IT Linux - Software 7 09-27-2006 03:07 PM
Help! Cannot Add a User to User Manager or Change Root Password lennysokol Linux - General 2 06-25-2005 10:59 AM
add user prompt for password on login redir Linux - Newbie 2 02-28-2005 12:01 PM
MySQL password & Comp's host. bulzbb Linux - Newbie 2 03-01-2004 01:28 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:15 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration