Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Junior Member gazman's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    28
    Member #
    566
    Ok, i feel really stupid for having to ask this, but what's the best way to setup the root password for both local and remote access, on a mySQL database? I've tried twice now, and both times i've locked myself out of the database (the first time both local and remote root access, and the second time just remote.... urgh).

    Yeah, yeah. I'm a fool

    btw the server is running on a win2000 system
    ~GaZ~

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Code:
    mysqladmin -u root password password_again
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #3
    Junior Member gazman's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    28
    Member #
    566
    erm... maybe i didn't do that properly.

    but that's not the real problem right now... the biggest problem is when I'm trying to create a user called "common"

    For simplicities sake I'm just trying to add him to the users table in the "mysql" database to give the user global db access. I assign the user the INSERT and SELECT priviledge (by inserting the value 'Y' for insert_priv, and select_priv)....

    I exit mysql, then re-enter, adding the -u common parameter to logon as "common" however when logged on as this user I can still delete, update, etc.

    Am i doing anything wrong there?
    ~GaZ~

  5. #4
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Try using the GRANT and similar queries instead of directly altering the user table (something MySQL doesn't suggest doing).
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  6. #5
    Junior Member gazman's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    28
    Member #
    566
    Okiedokie. Cheers Fil

    got my problem sorted tho. The problem was (no laughing please) I forgot that PHP automatically applied the mysql PASSWORD encryption function when connecting to a database (using the mysql_connect($server, $user, $pass) cmd), and I inserted the passwords into the mysql USER table in unencrypted form (because when I inserted the first time using the encrypted form, i must have mistyped as I couldnt connect then, so i panicked and inserted the unencrypted version...)...

    :dead:


    well that was the reason I was locking other usernames out of the database.

    As for the privilidges problem, I believe it was because specific hostnames come before wildcard hostnames, and since the hostname I use to connect to the database had more privilidges than the other user entry of the same name (but with % as the host) then I was connecting with more privilidges than I would somewhere else....
    ~GaZ~

  7. #6
    Senior Member zionlocke's Avatar
    Join Date
    Jan 2003
    Location
    .: l33t Basement :.
    Posts
    736
    Member #
    483
    Liked
    3 times
    interesting
    Cheers, zionlocke :chinese:
    Links: Zion Creation | Blog


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:30 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com