MySQL root password
Results 1 to 5 of 5

Thread: MySQL root password

  1. #1

    MySQL root password

    This is going to sound like a real n00b but I can't find it anywere, what command do I use to set the root password for mysql? I looked at the mysql command but I can't find any args to set the root password.
    Sitting Duck Security check it out

    (All right, all right, you guys talked me into it, I will just learn PHP instead of using ASP.)

  2. #2
    Senior Member
    Join Date
    Jul 2001
    Posts
    461
    http://www.mysql.com/doc/D/e/Default_privileges.html

    hope this helps,

    I dont want to flame you too hard, but, that was the very first item in the results for the google search listed below using the words MySQL set root password.

    http://www.google.com/search?hl=en&i...+root+password

  3. #3
    Senior Member
    Join Date
    Jun 2002
    Posts
    165
    # mysqladmin -u root -p password '[newpassword]'
    Enter password: [oldpassword]

    and if you are setting up for the first time i recommend following up with.

    # mysql -u root -p
    mysql> use mysql;
    Database changed
    mysql> delete from user where user='';
    Query OK, 1 rows affected (0.00) sec
    mysql> exit;
    Bye
    #
    -droby10

  4. #4
    yeah this is my first time using mysql, but now when I try to set the password I get,

    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    Can someone help me get this working.
    Sitting Duck Security check it out

    (All right, all right, you guys talked me into it, I will just learn PHP instead of using ASP.)

  5. #5
    Senior Member
    Join Date
    Jun 2002
    Posts
    165
    is mysql running?

    i really agree IchNiSan, so far your questions have both been located in the authoritative locations - as well as many others. you might try searching for some of this, as the best anyone else is going to be able to do is provide you with what they either already know or have found _for_ you. in the event that you have tried what is suggested, then it would be advisable to return with specific evidence of the problem to query for more help. just my 2 cents on generic tech-help via bbs.

    http://www.mysql.com/doc/C/a/Can_not...to_server.html

    http://www.google.com/search?hl=en&i...Fmysql.sock%27
    -droby10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides