> $cnx = mysql_connect("localhost","root","rootpassword");
>
> This fails. After i remove the password it is getting connected. [ie  $cnx
=
> mysql_connect("localhost","root"); ] But it fails to select database.
>
> $db  = mysql_select_db("test",$cnx);   /*  This Fails  */
>
> How i create username and password in mysql.
>
> I typed mysql in console as root. It go to mysql> prompt without asking
> anything. When i enter "show databases" command two databases namely
"mysql"
> and "test" are listed. I enter "use test" and create a table in test.
Setup a user for mysql with mysqladmin and grant all rights. Also create
users with required rights. Having root as a user with a blank password is
highly insecure. You can also use webmin or phpMyAdmin to administer mysql
databases



_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to