Click to See Complete Forum and Search --> : confused about php/MySQL


Prae
05-12-2003, 02:49 AM
I've installed (or at least I think I have installed) Apache/php/MySQL from the Redhat 8 discs (2 discs).

I've checked that I have php running and I do - phpinfo() returns information.

I've also d/l'ed and installed phpMyAdmin.

However, when I try to run it, I get the following message:

cannot load MySQL extension,
please check PHP Configuration.

I've gone back and checked my php.ini file and uncommented the line that says:

extension=mysql.so

Still get the above message.

I've tried running mysqladmin start and get the following:

/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql
.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' ex
ists!


Sure enough, there's no file there. I don't know how to find it. Can anyone help?

goon12
05-12-2003, 09:20 AM
If you do 'ps -ef | grep mysql' does it show any instances of mysqld running? If not you need to start the server. I don't know about the rpms, but I know before I compiled php, I had to enable the mysql module. Try starting mysql using "/usr/bin/safe_mysqld --user=username"


-goon12

redhat81
05-12-2003, 10:27 AM
I think RedHat uses: /etc/init.d/mysqld start

And to have it start on boot time:

chkconfig mysqld on

Prae
05-13-2003, 03:33 AM
Thanks for the help, but I'm embarassed to say - I'm still stuck.

I did manage to get mysql started using the command above and I was also able to set up a root password. I hadn't editted the config.php file in phpMyAdmin, but now I've done that so that my absolute path is http://localhost/.../and so on.

I still get the same message and it doesn't work. I know I should be trying to discover this on my own but there's so much stuff here (and the directory structure is pretty foreign to me) that I don't know where to start looking.

I've editted the php.ini file correctly, I think (uncommented the line with the mysql extension in it). Is there something else I should do? Is there a way to check php to determine if I have the mysql extension?

phpinfo() returns the following:

dbx
dbx support enabled
dbx version 1.0.0
supported databases
MySQL
ODBC
PostgreSQL
Microsoft SQL Server
FrontBase
Oracle 8 (not really)
Sybase-CT