I created a new administrator account when I upgraded to MySQL server 8.0.15 in windows 10.
However, I am not able to log into the server using mysql -u root -p. So, I tried using the newly created user account and attempted to start the server. Here's the things I have done :-
C:\Program Files\MySQL\MySQL Server 8.0.15\bin>mysql -u -p
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
C:\Program Files\MySQL\MySQL Server 8.0.15\bin>net start mysql
The service name is invalid.
More help is available by typing NET HELPMSG 2185.
C:\Program Files\MySQL\MySQL Server 8.0.15\bin>mysqld install
Service successfully installed.
C:\Program Files\MySQL\MySQL Server 8.0.15\bin>mysql -u -p
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
C:\Program Files\MySQL\MySQL Server 8.0.15\bin>net start mysql
The MySQL service is starting.
The MySQL service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.
C:\Program Files\MySQL\MySQL Server 8.0.15\bin>mysqld --initialize
C:\Program Files\MySQL\MySQL Server 8.0.15\bin>net start mysql
The MySQL service is starting....
The MySQL service was started successfully.
C:\Program Files\MySQL\MySQL Server 8.0.15\bin>mysql -u -p
ERROR 1045 (28000): Access denied for user '-p'@'localhost' (using password: NO)
C:\Program Files\MySQL\MySQL Server 8.0.15\bin>mysql -u root -p
Enter password: ********
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
C:\Program Files\MySQL\MySQL Server 8.0.15\bin>mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
C:\Program Files\MySQL\MySQL Server 8.0.15\bin>mysqladmin -u root password [newpassword]
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
C:\Program Files\MySQL\MySQL Server 8.0.15\bin>mysql GRANT ALL PRIVILEGES ON *.* TO 'abc'@'localhost' IDENTIFIED BY 'x123';
mysql Ver 8.0.15 for Win64 on x86_64 (MySQL Community Server - GPL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.
Usage: mysql [OPTIONS] [database]
-?, --help Display this help and exit.
-I, --help Synonym for -?
--auto-rehash Enable automatic rehashing. One doesn't need to use
'rehash' to get table and field completion ....
I have been struggling for many hours on this and I havn't the faintest idea how to make my connection work. Any help is greatly appreciated. Tks.