#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    2
    Rep Power
    0

    Working on setting up MySQL


    I would like to Replace the Root password in MySQL 5.6 running in Win7 Pro.

    I have a .bat file called:

    MySQLRootPasswordReplace.bat
    Code:
    @Echo On 
    :: Replace Root Password
     net stop MySQL56 
    C: 
    CD "C:\Programs\MySQL\MySQL Server 5.6\bin" 
    mysqld -nt --init-file=D:\Dnload\MySQLRootPasswordReplace.txt --console  
    ::net start MySQL56 
    CMD
    I have a .txt file called:

    MySQLRootPasswordReplace.txt
    Code:
    UPDATE mysql.user SET Password=PASSWORD('MyPassword') WHERE User='root'; 
    FLUSH PRIVILEGES;
    When I run it I get this:

    C:\Programs\MySQL\MySQL Server 5.6\bin>mysqld -nt --init-file=D:\Dnload\MySQLRoo
    tPasswordReplace.txt --console
    2013-12-18 23:37:48 0 [Warning] option 'new': boolean value 't' wasn't recognize
    d. Set to OFF.
    2013-12-18 23:37:48 0 [Warning] TIMESTAMP with implicit DEFAULT value is depreca
    ted. Please use --explicit_defaults_for_timestamp server option (see documentati
    on for more details).

    What did I do wrong?

    Thank you,

    Docfxit
  2. #2
  3. No Profile Picture
    Problem Solver
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2001
    Location
    Stockholm, Sweden
    Posts
    4,495
    Rep Power
    534
    Originally Posted by Docfxit
    C:\Programs\MySQL\MySQL Server 5.6\bin>mysqld -nt --init-file=D:\Dnload\MySQLRoo
    tPasswordReplace.txt --console
    2013-12-18 23:37:48 0 [Warning] option 'new': boolean value 't' wasn't recognize
    d. Set to OFF.
    What is your purpose with the "-nt" argument?

    My guess is that is what mysqld is complaining about because if I run:
    Code:
    mysqld --verbose --help
    It shows that the argument -n means:
    Code:
      -n, --new           Use very new possible "unsafe" functions
    /Stefan
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    2
    Rep Power
    0
    Thank you for the reply...

    I had just copied what someone else posted on how to change the root password. I have removed the -nt and that took care of the first warning. I now have remaining this warning:

    C:\Programs\MySQL\MySQL Server 5.6\bin>mysqld --init-file=D:\Dnload\MySQLRootPas swordReplace.txt --console
    2013-12-21 11:34:57 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option
    (see documentation for more details).

    Thank you very much for the suggestion,

    Docfxit

IMN logo majestic logo threadwatch logo seochat tools logo