[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] [RaQ4] Just installed MySQL (pkg), doesnt work with PHP
- Subject: Re: [cobalt-users] [RaQ4] Just installed MySQL (pkg), doesnt work with PHP
- From: shimi <shimi@xxxxxxxxxxxxxxxx>
- Date: Wed May 23 23:03:38 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
On Tue, 22 May 2001, Frederic Trudeau wrote:
>
> Hello all.
>
> Subject is pretty much straight-forward, but I have a couple of questions
> related to MySQL on a RaQ4. When I create a 'index.php' file with a code
> line like this one, for instance ;
>
> <?
> $link = mysql_connect(localhost,user,passwd);
> ?>
>
> I get the following error message ... Fatal error: Call to undefined
> function: mysql_connect() in /home/sites/site2/web/mysql.php on line 2
> Just as if PHP has not been configured --with-mysql, but it has ;
>
> http://ftrudeau.cam.org/
>
> Did I miss something here ?
>
> Also, why cant I enable/disable MySQL access to a given user on the
> machine ? I cant even connect to mysql using a random user already set for
> Telnet or SSH access ...
>
> Thanks for any help.
$dblink = mysql_pconnect($host, $user, $pass);
that's what works for me.
regarding the second question...
mysql has it's own userlist, independant on the unix password.
get webmin (the rom is fine) from www.webmin.com
and add users with no permissions *at all*
then go to database permissions, and give single users permissions to the
databases they need to have access.
NEVER GIVE ACCESS, TO ANYONE, TO THE DATABASE "mysql" - THAT DATABASE
CONTAINS ALL THE INFO ABOUT ALL THE USER AND DATABASE PERMISSIONS OF
MYSQL!!!! OBVIOUSLY, DON'T ERASE THAT DATABASE!!!
Also, make sure you changed your root password after installation of
mysql!!! Otherwise every local user (or people with access to cgi/php)
have FULL access to your databases! - You can know if you have set it or
not very simply. Can you connect to the MySQL monitor without a password
or not is the question that answers this question.
hopefully I made myself clear :-)
- shimi.