mysql server 8.0 keyring migration error at login

前端 未结 2 805
南旧
南旧 2021-01-05 00:27

I am using MySQL Server 8.0 on Windows 10. I followed this tutorial to initialize. C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin λ mysqld --initialize

相关标签:
2条回答
  • 2021-01-05 01:02

    Try using mysql -u root -p instead of mysqld - u root -p

    0 讨论(0)
  • 2021-01-05 01:20
    1. After Installation on windows---> check path-to-installed folder..eg.,C:\Program Files\MySQL\MySQL Server 8.0\bin
    2. open cmd-->cd go to above path
    3. type mysqld --initialize-insecure --console (it will initialize the data folder manually without password to root). For beginners i would suggest this option mysqld --initialize --console(it will initialize the data folder manually with random password to root)

    After this there could be error about unable to create data folder(try specifying the path to data like this eg..,mysqld --initialize-insecure --basedir=specify your path/mysql/mysql --datadir=specify your path/mysql/data)

    or data folder already exist(Go there and delete the data folder.)

    or for now later versions in data folder there is already a file exist named my.ini copy it and paste it to C:\Program Files\MySQL\MySQL Server 8.0(you could do more changes here and specify the path to data and base dir)

    1. Now you have successfully initialized without any password. Start the server. mysqld --console

    (NOTE: you could define the path to system environment variable(search google how to do it), after that you do not have to go this path every time) now your server up and running.

    mysqld: ready for connections Version: '8.0.15' socket: '' port: 3306

    1. Now use command --> mysql -u root --skip-password then

      mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';

    this command to set root password.

    1. next time use mysql -u root -p and after that enter you new_password
    0 讨论(0)
提交回复
热议问题