[nycphp-talk] install php 4.2.2 with mysql & apache
Oktay Altunergil
oktay at optonline.net
Thu Oct 10 11:59:22 EDT 2002
I don't know how you've installed it. But if you've installed from source, there's a step which you perform to set up the initial system tables.
(scripts/mysql_install_db)
See the following page. I've installed MySQL about 50 times using these instructions. (no I don't memorize stuff like this). It has never failed. Most times you can actually copy/paste most of the stuff.
http://www.mysql.com/doc/en/Quick_install.html
If you have alrady run mysql_install_db or you have installed RPM (hence install_db shouldn't be the issue) reset the password by doing the following in shell as root.
killall mysqld
safe_mysqld --skip-grant-tables & # (i think new versions call this mysqld_safe )
mysql
Once in the mysql monitor, run the following two queries.
use mysql;
UPDATE user SET password = PASSWORD("new_password") WHERE user = 'root';
FLUSH PRIVILEGES; # you don't need this since you'll restart again.
quit;
Then in shell again:
killall mysqld;
safe_mysqld&
Have fun. --oktay--
On Thu, 10 Oct 2002 11:50:09 -0400
"P. Fawcett" <fawcett at bard.edu> wrote:
> ah. wondered what those no/yes's were when testing stuff.
> but still failed
>
> #mysql --user=mysql -p mysql
> Enter password:
> ERROR 1045: Access denied for user: 'mysql at localhost' (Using password:
> YES)
>
>
> Oktay Altunergil wrote:
> >
> > try
> >
> > mysql --user=root -p mysql
> >
> > You're attempting to log in without a password (hence the 'Using Password: NO at the end' )
> >
> > Oktay
> > On Thu, 10 Oct 2002 11:35:56 -0400
> > "P. Fawcett" <fawcett at bard.edu> wrote:
> >
> > > tx. but i can't even shell> mysql --user=root mysql
> > >
> > > i get error:
> > >
> > > # mysql --user=root mysql
> > > ERROR 1045: Access denied for user: 'root at localhost' (Using password:
> > > NO)
> > >
> > > Oktay Altunergil wrote:
> > > >
> > > > http://www.mysql.com/doc/en/GRANT.html
> > > >
> > > > On Thu, 10 Oct 2002 10:44:03 -0400
> > > > "P. Fawcett" <fawcett at bard.edu> wrote:
> > > >
> > > > > tx.
> > > > >
> > > > > to confirm - so i can have both a mod & standalone cgi (thou i don't
> > > > > know why i'd want both but the programmers don't seem to know their
> > > > > environment so i'm just thinking of covering all bases till i get a
> > > > > handle on it.)
> > > > >
> > > > > i found that php 4.2.2 if mysql not specified in config, then it's auto
> > > > > built in
> > > > >
> > > > > so i've got php working but mysql won't do anything from within the
> > > > > server including basic #myqladmin version or variable info, returns
> > > > > w/error:
> > > > >
> > > > > "MySQL said:
> > > > > Host '204.nnn.nnn.nn' is not allowed to connect to this MySQL server"
> > > > >
> > > > > & docs point to 'make sure mysqld running- it is, & /tmp/msql-4socket
> > > > > exists -it does, so something else w/access prblm so i have to find
> > > > > mysql talk & maybe they'll know something
> > > > >
> > > > > Analysis & Solutions wrote:
> > > > > >
> > > > > > Hey P:
> > > > > >
> > > > > > On Wed, Oct 09, 2002 at 11:35:40AM -0400, P. Fawcett wrote:
> > > > > > >
> > > > > > > 1) if i have php, mysql & perl installed on the sys, do i have to
> > > > > > > include them in the other configs. ie configuring php --with-mysql?
> > > > > >
> > > > > > Yes. That gives PHP the ability to talk to MySQL. It makes PHP be
> > > > > > compiled with the MySQL functions.
> > > > > >
> > > > > > > configuring apache --with-perl
> > > > > >
> > > > > > This enables the apache/perl module. It speeds things up. Either way,
> > > > > > you can still call Perl scripts as standalone CGIs.
> > > > > >
> > > > > > > am i right mod's, ie mod_php is just a lighter version of php
> > > > > > > & not necessary if i have php 4.2.2 installed?
> > > > > >
> > > > > > Similarly, mod_php installs the apache/perl module, which speeds up
> > > > > > execution. If you install PHP separately, you can then also execute PHP
> > > > > > scripts in CGI mode.
> > > > > >
> > > > > > In both cases, CGI mode would have the script execute as the owner of the
> > > > > > script while the module versions execute as the Apache process.
> > > > > >
> > > > > > > but mysql would fail after config on: mysqladmin -u root -password
> > > > > > > "new-passwd"
> > > > > > > err: mysqladmin: connect to server at 'localhost'failed error: 'can't
> > > > > > > connect to local mysql server thru socket '/tmp/mysql.sock'(2). check
> > > > > > > that mysqld is running & that socket exists. well it wasn't & it didn't
> > > > > >
> > > > > > I run MySQL on Windows NT, so am not completely familliar with installing
> > > > > > it on linux, but I believe you need to install MySQL as normal. Then
> > > > > > start the daemon by issuing a "mysqld" command.
> > > > > >
> > > > > > > so i reconfig mysql with simplier 3.23.52 rpm, which would run thru the
> > > > > > > config ok, create the socket, start the daemon, but would populates
> > > > > > > files all over the sys and not create /usr/local/mysql dir, so without
> > > > > > > php config --with-mysql (no path) php would fail syntax in the
> > > > > > > hpptd.conf:
> > > > > > > LoadModule php4_module libexec/libphp4.so - "cannot load
> > > > > > > /usr/local/apache/libexec/libphp4.so into server:libmysqlclient.so".
> > > > > >
> > > > > > Find where the files are created and set your my.conf and/or other
> > > > > > configuration files/commands appropriately.
> > > > > >
> > > > > > --Dan
> > > > > >
> > > > > > --
> > > > > > PHP classes that make web design easier
> > > > > > SQL Solution | Layout Solution | Form Solution
> > > > > > sqlsolution.info | layoutsolution.info | formsolution.info
> > > > > > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
> > > > > > 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>
> --- Unsubscribe at http://nyphp.org/list ---
>
>
More information about the talk
mailing list