Professional Web Applications Themes

root pass wont change - MySQL

I have installed 5.0.18 on FreeBSD 5.3. from ports. No root passord set for mysql on any host. Please help. I have no idea. Can I just >make deinstall reinstall; or would I need to delete some database files first? shell>/usr/local/bin/mysqld_safe --skip-grant-tables & shell>mysqladmin -u root password 'mypassword' mysqladmin: You cannot use 'password' command as mysqld runs with grant tables disabled (was started with --skip-grant-tables). Use: "mysqladmin flush-privileges password '*'" instead shell> mysqladmin flush-privileges password 'mypassword' mysqladmin: unable to change password; error: 'Can't find any matching row in the user table' I also try (with --skip-grant-tables) mysql> UPDATE user SET ...

  1. #1

    Default root pass wont change

    I have installed 5.0.18 on FreeBSD 5.3. from ports.
    No root passord set for mysql on any host.
    Please help. I have no idea. Can I just >make deinstall reinstall; or would
    I need to delete some database files first?


    shell>/usr/local/bin/mysqld_safe --skip-grant-tables &
    shell>mysqladmin -u root password 'mypassword'
    mysqladmin:
    You cannot use 'password' command as mysqld runs
    with grant tables disabled (was started with --skip-grant-tables).
    Use: "mysqladmin flush-privileges password '*'" instead
    shell> mysqladmin flush-privileges password 'mypassword'
    mysqladmin: unable to change password; error: 'Can't find any matching row
    in the user table'

    I also try (with --skip-grant-tables)

    mysql> UPDATE user SET Password=PASSWORD('mypassword') WHERE
    Host='localhost' AND User='root';
    Query OK, 0 rows affected (0.00 sec)
    Rows matched: 0 Changed: 0 Warnings: 0

    mysql> SELECT * from user WHERE User='root';
    Empty set (0.00 sec)

    mysql> select * from user;
    +--------------------------------------------------------------+------------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+
    | Host | User
    | Password | Select_priv | Insert_priv |
    Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv |
    Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv |
    Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv
    | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv |
    ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions |
    max_updates | max_connections |
    +--------------------------------------------------------------+------------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+
    | localhost | root
    | | Y | Y | Y
    | Y | Y | Y | Y | Y | Y
    | Y | Y | Y | Y | Y



    7B4 Guest

  2. #2

    Default Re: root pass wont change

    "7B4" <aa.com> wrote in message news:43f40e94dnews.tpgi.com.au...
    >I have installed 5.0.18 on FreeBSD 5.3. from ports.
    > No root passord set for mysql on any host.
    > Please help. I have no idea.
    There are examples of several methods to reset the MySQL root password on
    this page:
    [url]http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html[/url]

    I think the third method may be the best for your situation. Remember to
    FLUSH PRIVILEGES after every time you update the mysql.user table.

    Also read the user comments, they're useful and informative.

    Regards,
    Bill K.


    Bill Karwin Guest

  3. #3

    Default Re: root pass wont change

    First off, it seems odd that if this were a default installation there
    would be only 1 user.

    Secondly, your query should work - unless you've got something odd
    going on (for example, there are some "extra" characters in the user or
    host fields).

    Why don't you start the server with the --skip-grant-tables option.
    Then add a user (using an insert statement). Give the user all
    privileges and a password - see if that works. You'll essentially
    creating a new "root" user.

    If that works, delete your current root user and start over.

    Another possibility is that the user that the server runs as doesn't
    have write access (for some reason..) to the user table (permissions
    problem, perhaps?) Though when this sort of thing occurs you should
    see some output in your error logs...and the server typically won't
    start.

    You can also just re-initialize the database (mysql_install_db) - once
    again, make sure the permissions are set correctly for the user that
    the server runs as before starting it.

    --
    Chander Ganesan
    Open Technology Group, Inc.
    Expert MySQL Training - at your site or ours
    [url]http://www.otg-nc.com/training-courses/category.php?cat_id=1[/url]

    Chander Ganesan Guest

  4. #4

    Default Re: root pass wont change

    Thanks for your direction.

    As usual it was stupid user error. I was starting the server without the
    user option. When I started with user mysql everything was good to go.

    Again, thanks your input certainly sorted me out.

    "7B4" <aa.com> wrote in message news:43f40e94dnews.tpgi.com.au...
    >I have installed 5.0.18 on FreeBSD 5.3. from ports.
    > No root passord set for mysql on any host.
    > Please help. I have no idea. Can I just >make deinstall reinstall; or
    > would I need to delete some database files first?
    >
    >
    > shell>/usr/local/bin/mysqld_safe --skip-grant-tables &
    > shell>mysqladmin -u root password 'mypassword'
    > mysqladmin:
    > You cannot use 'password' command as mysqld runs
    > with grant tables disabled (was started with --skip-grant-tables).
    > Use: "mysqladmin flush-privileges password '*'" instead
    > shell> mysqladmin flush-privileges password 'mypassword'
    > mysqladmin: unable to change password; error: 'Can't find any matching row
    > in the user table'
    >
    > I also try (with --skip-grant-tables)
    >
    > mysql> UPDATE user SET Password=PASSWORD('mypassword') WHERE
    > Host='localhost' AND User='root';
    > Query OK, 0 rows affected (0.00 sec)
    > Rows matched: 0 Changed: 0 Warnings: 0
    >
    > mysql> SELECT * from user WHERE User='root';
    > Empty set (0.00 sec)
    >
    > mysql> select * from user;
    > +--------------------------------------------------------------+------------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+
    > | Host | User |
    > Password | Select_priv | Insert_priv |
    > Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv |
    > Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv |
    > Index_priv | Alter_priv | Show_db_priv | Super_priv |
    > Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv
    > | Repl_client_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject |
    > max_questions | max_updates | max_connections |
    > +--------------------------------------------------------------+------------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+
    > | localhost | root |
    > | Y | Y | Y | Y | Y | Y |
    > Y | Y | Y | Y | Y | Y
    > | Y | Y
    >
    >
    >

    7B4 Guest

Similar Threads

  1. Change root folder ?
    By The ReZz in forum Coldfusion Server Administration
    Replies: 7
    Last Post: April 6th, 06:47 PM
  2. Line thickness wont change:(
    By Michelle_McKinnon@adobeforums.com in forum Adobe Illustrator Windows
    Replies: 3
    Last Post: June 1st, 04:29 PM
  3. how to pass varaible from root to external swf
    By adi_c_adi in forum Macromedia Flash Actionscript
    Replies: 1
    Last Post: February 17th, 02:43 AM
  4. Can I Change root directory???
    By rideonmidnightrudy webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 4
    Last Post: July 9th, 09:31 PM
  5. XP Field Text Colour wont change
    By brad anderson in forum FileMaker
    Replies: 0
    Last Post: June 29th, 10:46 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139