Re: [PHP] strange errors from command line vs. web



On Thu, September 28, 2006 7:26 am, blackwater dev wrote:
Ok, I've set up a username and password using Grant All Privileges,
blah.
with username and password. For some reason though the web now can't
login
with that. I then changed the root db password and put that in the
config
and the web side does run properly with that username, password. I
still
can't run the script from the command line even when I su to root.

su root or not does *nothing* to help you run MySQL and do database
things.

MySQL has a user called 'root' but it's not in any way, shape, or form
related to the OS 'root'.

Well, okay, the *idea* is the same, and the *name* is the same... But
that's it!

The *only* thing that matters to MySQL is the username/password used
to connect, and what permissions have been granted in MySQL to that
username/password.

echo "about to connect";
$this->connectionID= @mysql_connect($this->host, $this->user,
$this->password);
echo "after connect";

Get rid of the @, at least until you figure out what is going on.

again, I am su'ing to root so I thought it would always have rights.

Don't bother su-ing to root. It has no effect on MySQL whatsoever.

--
Like Music?
http://l-i-e.com/artists.htm
.



Relevant Pages

  • RE: unable to login as user
    ... unable to login as user ... Log in as root and look closely at the user account. ... the system just seems to hang and then go back to the username ...
    (RedHat)
  • [NEWS] Weak MySQL Default Configuration
    ... MySQL is an open-source database produced by ... NULL root Password ... any host, without password. ... with the default root/NULL login, this means that anyone can remotely ...
    (Securiteam)
  • Re: Default username and password in MySQL
    ... >> I can't figure out the default password and username in MySQL on Red Hat ... PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER! ... Registered Linux User #285004 ...
    (linux.redhat)
  • Mandrake Linux Login Problem!!!
    ... I created a user student apart from root. ... When I wish to login, it presents me with only one username i.e. ...
    (comp.os.linux.networking)
  • Re: mysql problem
    ... a specific reason I used a root shell to start the MySQL client. ... login, a sudo root login and as a non-root login. ...
    (Ubuntu)