LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-13-2002, 10:46 PM   #1
cmisip
Member
 
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 192.168.1.252 -u mythtv from PC 2 I get:

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

Thanks
 
Old 12-14-2002, 01:47 AM   #2
markus1982
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'@'192.168.1.1' IDENTIFIED BY 'password';


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

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

I tried on the PC with the mysql server:

su
mysql mysql
msyql> grant all privileges on *.* to mythtv@192.168.1.1 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 '192.168.1.252' (111) when I try to do a
user@localhost]mysql -h 192.168.1.252 -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, 09:57 AM   #4
ascii2k
Member
 
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@192.168.1.1" 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.
 
  


Reply



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 22 12-25-2017 06:05 PM
add a user with password without prompt grendel-IT Linux - Software 7 09-27-2006 02:07 PM
Help! Cannot Add a User to User Manager or Change Root Password lennysokol Linux - General 2 06-25-2005 09:59 AM
add user prompt for password on login redir Linux - Newbie 2 02-28-2005 11:01 AM
MySQL password & Comp's host. bulzbb Linux - Newbie 2 03-01-2004 12:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:58 PM.

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