What is the MYSQL user name?
This article is to share with you about what the MYSQL user name is. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
MYSQL user name: root
3306
Attention to Chinese garbled code:
1. Delete the table with garbled code first.
two。 Change the configuration of MYSQL (ini file)
3. Restart the MYSQL service
1. Create a database
Create database database name
Create database forStudy
two。 Use an existing database
Use database name
Use forStudy
SQL statement
1. Construction table sentence
Create table table name (
Field Typ
)
Create table student (
Id int primary key
Name varchar (50)
Sex varchar (10)
Address varchar (255)
)
Create table student (
User varchar (10)
Passwd varchar (50)
)
/ / primary key is used to define the primary key (unique identification)
Delete table statement
Drop table table name
Drop table sudent
two。 Insert statement
Insert into table name (field list) values (corresponding field value)
INSERT INTO STUDENT (ID,NAME, SEX, ADDRESS)
VALUES (3) 'Wang Wu', 'male', 'Henan Nanyang')
INSERT INTO STUDENT (ID,NAME, SEX, ADDRESS)
VALUES (4) 'Wang Dan', 'female', 'Henan Nanyang')
INSERT INTO STUDENT (ID,NAME, SEX, ADDRESS)
VALUES ('Liu Liu', 'male', 'Henan Nanyang')
3. Query statement
SELECT * FROM table name
Select * from student
4. Update statement
Update table name set name ='Li Si 'where id = 2
UPDATE STUDENT SET NAME ='Li Si 'WHERE ID = 2
UPDATE STUDENT SET NAME ='Li Dan', SEX = 'female' WHERE ID = 2
5. Delete statement
Delete from table name where
DELETE FROM STUDENT WHERE ID = 12
Four operations of addition, deletion, query and modification
Student
S_id s_name d_id
Department don't
D_id d_name
1 'Software College'
Select * from student where d_id = (
Select d_id from dep where d_name = 'Software Academy')
SQL
Thank you for reading! This is the end of the article on "what is the user name of MYSQL?". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!