Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the MYSQL user name?

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report