View Full Version : Simple question
Kernel_Killer
September 5th, 2003, 04:42
Having trouble setting my password with a host. This is what I get:
[code:1:7816280550]
KK@/home/KK> mysqladmin -u root -h fakehost password 'password'
mysqladmin: connect to server at 'fakehost' failed
error: 'Host 'fakehost.fakedomain' is not allowed to connect to this MySQL server'
[/code:1:7816280550]
Now I did change my /etc/hosts file to show 127.0.0.1 as fakehost.fakedomain fakehost. I also tried setting my internal IP to the same host/domain, and still recieved the same error. If I do a command without the host I don't have any trouble, but I need to be able to add the host command. None of the mysqladmin commands produce a different error. Same with telnetting the port. Any idea what I'm doing wrong?
soup4you2
September 7th, 2003, 15:50
If you can still get into mysql use this method
$mysql -u root -p
\u mysql;
SELECT * FROM user;
you should see your users..
now are you just using this for the localhost? no other machies connecting?
if so
DELETE FROM user WHERE Host = 'hostname';
DELETE FROM user WHERE User = '';
SET PASSWORD FOR 'root'@'localhost'=PASSWORD('SoupIsGod');
DROP DATABASE test;
commit;
and to add in other users.. i recommend removing root and using some diffrent name for your master user..
INSERT INTO user VALUES ('localhost','db_admin',PASSWORD('password'),'Y',' Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y' );
there should be 14 Yes's
soup4you2
September 9th, 2003, 11:50
did this help?
Kernel_Killer
September 9th, 2003, 18:03
Sorry Soup4You2. Worked great. I deleted the user from the tables, and then issued new ones to the sguildb table. Work great!
soup4you2
September 9th, 2003, 18:17
If your not too good w/ your SQL queries there's some nice GUI frontends for Mysql.. there's even a web based one called PhpMyAdmin
Kernel_Killer
October 22nd, 2003, 05:29
I've tried some of those GUI apps, but it's just not the same. I need to learn this stuff (Don't ask why. I don't know). :D
soup4you2
October 22nd, 2003, 10:29
I've tried some of those GUI apps, but it's just not the same. I need to learn this stuff (Don't ask why. I don't know). :D
good man... when i took my oracle classes i got a good handle for sql.. though most of what i learned is slipping now..
I guess i should go ahead and install that oracle zip on my playbox..
molotov
October 23rd, 2003, 01:25
PhpMySQL admin is a nice tool for web based admin work, very nice for editing stuff, and tme saving in general, although i agree that knowing the cli is of great importance. You might at least want to give it a try, i know my work would be a lot harder without it.
soup4you2
October 23rd, 2003, 02:00
if you goto oracles site and register w/ them they have some nice SQL reference pdf's
some may pertain to PL/SQL but there's still some SQL stuff in there
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.