Article From:

servives.msc Turn on the computer service to see the startup of MySQL.

net stop MySQL Stop MySQL running
net start MySQL Start MySQL

Note: sometimes you need administrator status, otherwise it will not work.

There are two ways:
1 Connect to database: MySQL -u+ username -p+ user password -hlocalhost -P3306 (local do not lose -h and -P)
mysql -uroot -padmin -h127.0.0.1 -P3306


 If you are a local visitor, you don’t need to add -h and -P.

2 After the installation of MySQL, a command window will be automatically produced and can be used directly.


Open the database service:
show databases;
Use a database:
use database MySQL;
Look at the table of the database:
show tables;
Create a new database:
create database demoBase;
Delete a database:
drop database demoBase;

Pay attention to the semicolon.

Link of this Article: Some operations of MySQL

Leave a Reply

Your email address will not be published. Required fields are marked *