Koozali.org: home of the SME Server

Locked out of MySQL

Tim Jabaut

Locked out of MySQL
« on: May 24, 2001, 04:12:35 PM »
I am having trouble trying to connect to my E-Smith server with MYSQL GUI from a Windows 2000 PRO admin workstation. I would like to be able to admin/query a MySQL Database from this machine; however; when I try to connect it keeps telling me:

"Host 'pc-00101.xxx.xxx.com' is not allowed to connect to this MySQL server"

I can telnet to the server from this machine and run MySQL command line commands no problem.

Any ideas?

Mike Stoddart

Re: Locked out of MySQL
« Reply #1 on: May 24, 2001, 05:25:11 PM »
I dont know the exact command syntax you'll need, but you have to configure MySQL to accept connections from your Win2000 machine. Got www.mysql.com and read up on the GRANT command.

Tim Jabaut

Re: Locked out of MySQL
« Reply #2 on: May 25, 2001, 03:29:07 PM »
Thanks,

I'll look into it this weekend.

Matt W

Re: Locked out of MySQL
« Reply #3 on: June 22, 2001, 07:47:51 AM »
I was having the same problem... I looked up the GRANT command in the mysql manual and i found some usefull commands.  This is from the manual:
shell> mysql --user=root mysql
mysql> GRANT ALL PRIVILEGES ON *.* TO monty@localhost
         IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO monty@"%"
          IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT RELOAD,PROCESS ON *.* TO admin@localhost;
mysql> GRANT USAGE ON *.* TO dummy@localhost;

These GRANT statements set up three new users:

monty: A full superuser who can connect to the server from anywhere, but who must use a password 'some_pass' to do so. Note that we must issue GRANT statements for both monty@localhost and monty@"%". If we don't add the entry with localhost, the anonymous user entry for localhost that is created by mysql_
install_db will take precedence when we connect from the local host, because
it has a more speci c Host held value and thus comes earlier in the user table
sort order.

admin: A user who can connect from localhost without a password and who is granted the reload and process administrative privileges. This allows the user to execute the mysqladmin reload, mysqladmin refresh, and mysqladmin flush-*
commands, as well as mysqladmin processlist . No database-related priv-
ileges are granted. (They can be granted later by issuing additional GRANT
statements.)

dummy: A user who can connect without a password, but only from the local host. The global privileges are all set to 'N' | the USAGE privilege type allows you to
create a user with no privileges. It is assumed that you will grant database-
specic privileges later.

Hope this helps

Matt W