From owner-freebsd-questions@FreeBSD.ORG Sat Jun 19 07:10:55 2004 Return-Path: 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 B42A216A4CE for ; Sat, 19 Jun 2004 07:10:55 +0000 (GMT) Received: from audiogram.mail.pas.earthlink.net (audiogram.mail.pas.earthlink.net [207.217.120.253]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E4EA43D39 for ; Sat, 19 Jun 2004 07:10:55 +0000 (GMT) (envelope-from lwellis@mindspring.com) Received: from h-66-166-251-100.dnvtco56.dynamic.covad.net ([66.166.251.100] helo=LLAPTOP) by audiogram.mail.pas.earthlink.net with asmtp (Exim 4.34) id 1BbZzt-00068F-F7; Sat, 19 Jun 2004 00:10:41 -0700 Message-ID: <005501c455cc$8a7ddc10$0200a8c0@LLAPTOP> From: "LW Ellis" To: "Kjell Midtseter" , References: <40D3FEDB.18460.6334A2@localhost> Date: Sat, 19 Jun 2004 01:10:45 -0600 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-ELNK-Trace: aa15571473bf62249649176a89d694c0f43c108795ac450727969b8d94fa0fb9ae5635662bb8392e350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 66.166.251.100 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Solved mysql install problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jun 2004 07:10:55 -0000 Thanx I muddle thru it from here. Have a good weekend. Leon ----- Original Message -----=20 From: Kjell Midtseter=20 To: LW Ellis=20 Cc: freebsd-questions@FreeBSD.org=20 Sent: Saturday, June 19, 2004 12:52 AM Subject: Re: mysql install problem Continued On 19 Jun 2004 at 0:26, LW Ellis wrote: > OK force didn't work, but I renamed hostname to localhost, > until the install was done. > When I rebooted it showed mysql started. First you have to let the SQL server know what databases and users you = want to use: 1) Set password for root user after initial load # mysqladmin -u root password 'verysecret' 2) During subsequent user updates or adding new DataBase info: # mysql -u root -p mysql Enter password: (enter "verysecret" or whatever you entered in step = 1) Users: insert into user = (host,user,password,Select_priv,Insert_priv,Update_priv,Delete_priv,Creat= e_priv,Drop_priv) values = ('localhost','us_allprivileges',password('verysecret'),'Y','Y','Y','Y','Y= ','Y'); insert into user = (host,user,password,Select_priv,Insert_priv,Update_priv,Delete_priv) = values = ('localhost','us_readandwrite',password('verysecret'),'Y','Y','Y','Y'); insert into user (host,user,password,Select_priv) values = ('localhost','us_readonly',password('verysecret'),'Y'); (You may want to select different database and user names) Databases and their users: insert into db = (host,db,user,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv= ,Drop_priv) values = ('localhost','db_one','us_allprivileges','Y','Y','Y','Y','Y','Y'); insert into db = (host,db,user,Select_priv,Insert_priv,Update_priv,Delete_priv) values = ('localhost','db_one','us_readandwrite','Y','Y','Y','Y'); insert into db (host,db,user,Select_priv) values = ('localhost','db_one','us_readonly','Y'); 3) Create new data base # mysqladmin -u root -p create db25872a Enter password:=20 SQL server must be restarted for changes to take effect: mysqladmin -p -u root reload > Now please can you tell me how to access it. > In Dreamweaver, I need a SQL (server) generally an IP address. Start with a index.html page containing a "hello Leon"=20 When this is working try the same in a index.php page. This working you are ready to access your SQL server through the MySQL = PHP API to Apache. You connect to your database using the following = piece of coding: Now you are ready to issue your select, update, insert, etc. = statements in your PHP code. A bit of Googling will produce several = introductions to PHP/MySQL coding. > I have named running on my machine, do I need to configure > this to point to mysql server. No > I downloaded mysql handbook, which should handle that end. > (I know sql language, but I am an ASP kind of guy) > Thanx for all your help. >=20 > Leon