Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Mar 2002 12:31:56 -0500 (EST)
From:      Richard Glidden <richard@glidden.org>
To:        Michael Sharp <ms@probsd.ws>
Cc:        questions@FreeBSD.ORG
Subject:   Re: MySQL Server
Message-ID:  <20020309122303.U19144-100000@charon.acheron.localnet>
In-Reply-To: <1869.192.168.1.2.1015663252.squirrel@probsd.ws>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 9 Mar 2002, Michael Sharp wrote:

> When a remote user trys to connect to my MySQL server, they get an error:
> User is not allowed to connect to this server.  Do I need to add users with
> mysqlaccess to allow a remote host to connect ?

Yes, you need to set up the appropriate privileges in the 'mysql'
database.  The db, host and user tables contain all the access rights to
the mysql server.  There are several ways to access the privilege system.

> If so, what would be the command to allow any remote host to connect to the
> database " freebsd " with the password " powertoserve " ?

Can't help you here.  I usually just use "mysql -u root -p mysql" to
connect to the mysql database, then use the sql GRANT command to add
privileges, or manually add users into the db, host and user tables.
(It's a pretty small database that I'm using, with only a handful of
users).  Be sure to run 'FLUSH PRIVILEGES' after modifying the grant
tables directly.

Take a look through /usr/local/share/doc/mysql/manual_toc.html There's a
pretty good section in there on setting up the access rights to the
various databases.  If that's not on your system for some reason, it's
also on http://www.mysql.com/ under Documentation.  There's probably an
example that does something similar to what you want.

-- 
Richard Glidden
richard@glidden.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020309122303.U19144-100000>