"Raheel Hussain" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
> hi,
>
> I m a newbie programmer and has just started working on php, i m not
actually having much problem in it as because i have backgroud of C/C++ and
vb and ASP and Pascal etc.
> I have a little confusion , may be it is gonna be a cheap question the
question is as follows
>
> 1 - I have a mysql database on my local server on which i m trying php
scripts.
> now i m gonna upload this site,
> I found out a function of mysql through which i m going to create the
> mysql db on the sever with phpscripts
> which is  ( mysql_create_db() )
> but i want to write my scripts as follows
>
> if ( database doesn't exists )
>  create db;

As far as I know, in mysql you cannot create a database that is allready
created.... So, the mysql_create_db() function *should* return an error....

>
> 2 - and the other thing which is actually about mysql, which is how do i
set different database passwords to different database.
>
> as because in my server ( win 2000 ) there is only one password which i
use when using mysql_connect() fucntion
>
>

Again, as far as I know, mysql has a user+host+password security setup. That
is, if you have an user (say foo-user) with the password foo-password, you
could give it access only to a database (based on username and password)...
Then you could create another user, with the same name but another
password... and give it access to another database.....

The GRANT syntax is : GRANT ...privileges... on database[.table.[column]]
to user foo.. identified by  password...


>
> ---------------------------------
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to