http://mysql.com/documentation/mysql/bychapter/manual_Privilege_system.html#
Adding_users

Check out the docs here.

You need to add users this way:

shell> mysql --user=root mysql
mysql> GRANT ALL PRIVILEGES ON *.* TO monty@localhost
           IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO monty@"%"
           IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT RELOAD,PROCESS ON *.* TO admin@localhost;
mysql> GRANT USAGE ON *.* TO dummy@localhost;

olinux

----- Original Message -----
From: "Matt Coyne" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 19, 2001 8:16 AM
Subject: [PHP-DB] PHP mysql_connect Access Denied


> Hi
>
> Newbie here
>
> I am running Apache/PHP/MySQL locally which emulates my server environment
> online. I want to use it as a test environment.
>
> I am running through Julie Meloni's 'PHP Fast & Easy...' and have run up
> against a problem.
>
> Using the mysql_connect statement in a php page:
>
> <?
> $connection=mysql_connect("localhost", "threezero", "qwerty00") or die
> ("could not connect");
>
> if ($connection) {
> $msg = "success";
> }
>
> ?>
> <html>
> <head>
> <title>MySQL Connection</title>
> </head>
> <body bgcolor="#FFFFFF" text="#000000">
>
> <? echo "$msg"; ?>
>
> </body>
> </html>
>
> I get the following error returned in any browser:
>
> Warning: MySQL Connection Failed: Can't connect to MySQL server on
> 'localhost' (10061) in c:\program files\apache
> group\apache\htdocs\threezero\phptests\dbstuff\db_connect.php on line 2
> could not connect
>
> This is returned after enetering the following into the 'mysql' database
> using the MySQL monitor:
>
> insert into user (host, user, password) values ('localhost', 'threezero',
> password('qwerty00');
>
> Querying the table returns the inserted values in the table (the password
> column being encrypted).
>
> I am thinking that there are some potential configuration problems as the
> php page works in my online server environment (pair networks)
>
> Has anyone got an idea where I am going wrong and/or can point me in the
> right direction?
>
> Any help appreciated.
>
> TIA
> Matt Coyne
>
>
> t  h  r  e  e  z  e  r  o     :       :      :
>
> the mill, millstone lane, leicester, le1 5jn
> e : [EMAIL PROTECTED] ::  m : 07747 845690
> w : http://www.threezero.co.uk
>
> :       :      :    t  h  r  e  e  z  e  r  o
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to