From owner-freebsd-questions Sun Sep 1 14:58:45 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A97E37B4E3 for ; Sun, 1 Sep 2002 14:58:21 -0700 (PDT) Received: from mtiwmhc21.worldnet.att.net (mtiwmhc24.worldnet.att.net [204.127.131.49]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D6C443E42 for ; Sun, 1 Sep 2002 14:58:20 -0700 (PDT) (envelope-from blake@pyramus.com) Received: from pyramus.com ([12.81.194.73]) by mtiwmhc21.worldnet.att.net (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020901215819.LBLP23721.mtiwmhc21.worldnet.att.net@pyramus.com>; Sun, 1 Sep 2002 21:58:19 +0000 Message-ID: <3D728CA3.3080203@pyramus.com> Date: Sun, 01 Sep 2002 14:54:43 -0700 From: Blake Swensen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1 X-Accept-Language: en-us MIME-Version: 1.0 To: Jeff Jeter Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Mysql won't let me in -- Update References: <20020831114147.39c550b7.gsfgf@softhome.net> <3D70C959.19129.39875B56@localhost> <20020901151654.2ca551ad.gsfgf@softhome.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG You need to connect to the server locally then log into the MySQL server as root using: % mysql -u root -p then you have to grant access to the desired database to the particular user at the particular host... like: > use mysql > grant all on database.* to username@host identified by 'password' You can wildcard the host name by using '%' username@'%domainname': gives access to that username at any host on your domain username@'10.10.%' : gives access to that user at any host on your private network. username@'%': gives access to that user from ANY machine on the network Two words of caution: I have noticed that granting the user access to specified database@localhost first makes access run a little smoother. NEVER do this: grant all on *.* to root@'%' ... this will open a door to root access from any machine on the network.. ill advised. In fact you should never grant any rights to root except root@localhost. Finally the only user/machines that need access are your webserver and any development machines that connect via ODBC, etc. Peace, Blake Jeff Jeter wrote: >I got it eorking locally, but when i try to connect remotely "mysql -h server" it hangs. How do i allow access. I can't connect w/ ftp, nfs, or telnet to this box either. my /etc/hosts.allow is "ALL : ALL : allow" > > >On Sat, 31 Aug 2002 13:49:13 -0700 >"Corey Snow" wrote: > >>On 31 Aug 2002, at 11:41, Jeff Jeter wrote: >> >>>I installed mysql, started it with safe_mysqld, and changed the root password w/ mysql admin. mysqladmin -u root password ******** now when i try to create a databas w/ mysql admin it won't accept a pass. >>> >>>mysqladmin create mini >>>mysqladmin: connect to server at 'localhost' failed >>>error: 'Access denied for user: ' root@localhost' (Using password:NO)' >>> >>Try just >> >>%mysql -u root -p >> >>Which should prompt you for the password. You might also try >>"root@servername" as the user ID, but that's a long shot. >> >>Corey >> >> > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message