situation
- I did install MySQL by using a MySQL installer and I did fill out the content as following MySQL did ..but not asked a password ..
try
Anyway I tried to start mysql set-up in the command prompt..
cd C:\Program Files\MySQL\MySQL Server 8.0\binmysql -u root -perror (without password )
environment
windows10 64 bitI installed
mysql-installer-web-community-8.0.22.0.msi
Besides, I've ever used Xampp and Local before for WordPress development ..
I did install when setup
・Mysql Server (latest version)
・Mysql workbranch(latest version)
・mysql Shell (latest version)
・mysql for visual studio (latest version)
Error content
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)my goal
- I want to use MySQL in the visual studio with laravel ..
2 Answers
MySQL by default sets the username to root and there’s no password.
You can now run mysql -u root -p and be logged in without a password.
Unfortunately, some applications and services that depend on MySQL will fail if
a root password is needed for authentication.
The following method will allow you set a password, or reset it if one was defined and forgotten.
Run the Services applet (
services.msc)Find the MySQL service, right-click that entry, then click Stop
Create a text file containing this one line with any name, but here I will call it
mysql-init.txt(replace "NewPassword" but keep everything else):ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewPassword';Run the Command Prompt (
cmd.exe) as AdministratorNavigate to the MySQL folder by a command similar to the following (version number may change):
cd "C:\Program Files\MySQL\MySQL Server 8.0\bin"Enter the following using two slashes for each slash (
\\):mysqld --init-file=C:\\path\\mysql-init.txtNow you may log into the MySQL server as root using the new password, after restarting the MySQL service. The file
mysql-init.txtis no longer needed.
For more details see the articleHow to Reset or Change MySQL Root Password on Linux or Windows.
1- Open MySQL-Installer Community usind Windiws + R (Serach here for MySQL installer community)
- Click on Reconfigure which is next to MySQL server
- Click Next
- Click Next
- Click Next => Next => Execute
- Its done