Using MySQL under cmd command

Because there were many small errors during the process of starting the MySQL server, I recorded them.

Start the server: net start MySQL

Error: The server is invalid.
Solution: Enter the MySQL bin folder and enter the command: mysqld.exe -install

Denied service encountered during installation

Solution: Right click and open cmd with administrator privileges

After the installation is complete, start the server

You must enter the command in the bin folder of MySQL: mysql -hlocalhost -uroot -p and press Enter.
Note: Just enter the password to set it. If there is no password, just press Enter.
Seeing the following screen means that the startup is successful
Insert image description hereand you can view it. There is a database: showdatabases;
note: it must be a command and must end with an English semicolon

Guess you like

Origin blog.csdn.net/weixin_44236278/article/details/98482054