Hi,

Looks like your problem is related to Access Privileges setup.  Take a look at
http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Privilege_system

That should get you started.

I'll just summarize a bit what the manual says here.  MySQL's security is based on ACL 
that controls who from where can connect, execute query, or administer.  Using the 
client, connect to mysql database and issue a command show tables from mysql.  You 
should see something like
+-----------------+
| Tables_in_mysql |
+-----------------+
| columns_priv    |
| db              |
| func            |
| host            |
| tables_priv     |
| user            |
+-----------------+

The table "user" is what you should pay attention to first.  Since that's the table 
MySQL consults upon a connection.  For your case, if your host IP is something like 
123.345.567.789 and your user name is riyaz.  Just do

insert into user (Host, User, Password) values ('123.345.567.789', 'riyaz', 
Password('your password).

then

flush privileges

That should let you connect to MySQL using a host other than localhost.  But you won't 
be able to do a thing with this connection.  Because all the privileges for user riyaz 
from 123.345.567.789 are set to "N" in user table.  You can either change all the 
privileges to "Y" (bad choice) or do a finer definition in db table or a combination 
of db & table (HIGHLY recommended).  If you have a programming background, the whole 
thing works like this (taken from manual):

Expressed in boolean terms, the preceding description of how a user's privileges are 
calculated may be summarized like this: 

global privileges (defined in table user)
OR (database privileges AND host privileges) (defined in table db and table host)
OR table privileges (defined in table tables_priv)
OR column privileges (defined in table column_priv)

You can find in-depth explanation from the documentations so check it out :)

Cheers,

Jindo

-----Original Message-----
From: install [mailto:install]On Behalf Of Riyaz Husain
Sent: Wednesday, September 12, 2001 5:04 AM
To: mysql
Subject: Database connection error


Hi,

Can someone help out there?

I have installed MySql 3.23.41 on Solaris. Created a database 
and executed the test script - run-all-tests which tested my 
installation/configuration. No error was reported.

When I connect to the database from the installation server 
through command line - ./mysql - I get connected using localhost. 
It fails to get connected using hostname or IP address.

Now, when I try to access my database from a web page using 
localhost as hostname through perl script, it refuses to let me
in to the same database. 

I have refererred manuals, but still couldn't figure out the solution.
My total experience of using mysql is just a couple of days. Forgive 
me if this sounds silly. But please come back.

Regards,

Riyaz

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to