RE: [PHP-DB] Access denied for user: 'root@localhost'
| From: | Vrana Bohdan | Date: | Thu, 22 Aug 2002 15:58:33 +0000 |
| Subject: | RE: [PHP-DB] Access denied for user: 'root@localhost' | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-21315@lists.php.net to get a copy of this message | ||
sorry for not explain the problem,
I find in mysql manual how to check connection to mysql server using 4
or 5 commands like you wrote, may be with -h localhost or -h
host.domain.sk and all is working well. There is:
[root@ns httpd]# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 16 to server version: 3.23.41
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
mysql>
mysql> show databases;
+----------+
| Database |
+----------+
| djs |
| horde |
| mysql |
| test |
+----------+
4 rows in set (0.48 sec)
mysql> quit
-----Original Message-----
From: Adam Williams [mailto:awilliam@mdah.state.ms.us]
Sent: Thursday, August 22, 2002 5:54 PM
To: Vrana Bohdan
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Access denied for user: 'root@localhost'
On the linux text console type
mysql -u root -p
and it will say mysql: and put in your password. If it gives you an
error message reply with it.
Adam
On Thu, 22 Aug 2002, Vrana Bohdan wrote:
> I had set a password for mysql user root,
> when i try to run index.php3 with body:
>
> <?php
>
> mysql_connect("localhost", "root", "pass");
>
>
>
> mysql_select_db("djs");
>
> echo mysql_errno() . ": " . mysql_error(). "\n";
>
>
>
> mysql_select_db("kossu");
>
> mysql_query("SELECT * FROM nonexistenttable");
>
> echo mysql_errno() . ": " . mysql_error() . "\n";
>
> ?>
>
>
> I'll receive this error:
> Warning: Access denied for user: 'root@localhost' (Using password: NO)
> in /home/httpd/horde/index.php3 on line 2
>
> Warning: MySQL Connection Failed: Access denied for user:
> 'root@localhost' (Using password: NO) in /home/httpd/horde/index.php3
> on line 2 .
> .
> .
>
> I install php and mysql support to linux system later. Where is the
> problem? What I need to do to system, to correct this (i think php)
> problem? It is I need to run phpMyAdmin on server. What do you
> recommaned to me?
>
> Thank you,
> bogio
>