RE: [PHP-DB] Access denied for user: 'root@localhost'

From: Date: Thu, 22 Aug 2002 19:27:04 +0000
Subject: RE: [PHP-DB] Access denied for user: 'root@localhost'
Groups: php.db 
Request: Send a blank email to php-db+get-21318@lists.php.net to get a copy of this message
I got it: I uninstall this rpm: apache+php+mysql and reinstall it in new order 1.mysql, 2.php+all_lib, 3.apache+all_lib and got to normal good operation status. Thanks for your time -----Original Message----- From: Adam Williams [mailto:awilliam@mdah.state.ms.us] Sent: Thursday, August 22, 2002 6:09 PM To: Vrana Bohdan Cc: php-db@lists.php.net Subject: RE: [PHP-DB] Access denied for user: 'root@localhost' If you can connect fine on the command line, then I don't understand why your PHP script can't connect to the mysql database using the same username and password you used on the command line. Sorry I can't be of anymore help. Adam On Thu, 22 Aug 2002, Vrana Bohdan wrote: > 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 > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.db (#21318) next »