当前位置:网站首页>cmd (command line) to operate or connect to the mysql database, and to create databases and tables
cmd (command line) to operate or connect to the mysql database, and to create databases and tables
2022-07-30 06:05:00 【burial】
1. Related Instructions
1. Press the windows+R keys on the keyboard to enter cmd, or directly enter cmd in the search box
2. Enter mysql:
Enter mysql -uroot -p at the command line, then enter your mysqlPassword, enter the mysql database after success
3.View databases in mysql
show databases;
4. Use a database
use database name;
The database can only be accessed after we issue the command to use the database
5. View the tables in the database
NoteOnly when we start using this database, we can operate with the database you are using
show tables;
6. View table design structure
describe table name;
or
desc table name;
2. Create a database and its tables
1. First you still need to connect to the database
2.Create database
create database database name;
3.Use database
use database name;
4.Create table
5. Summary
I believe my friends here, and I also know how to insert data to operate the database, I won't go into details here.Thank you for your likes and followings, thank you all!
Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
猜你喜欢

MySQL Basics (DDL, DML, DQL)

手把手教你彻底卸载MySQL

并发编程复习

idea设置自动带参数的方法注释(有效)

SOA(面向服务架构)是什么?

Solve the problem that the local nacos is not configured but the localhost8848 connection exception always occurs

MySQL基础(DDL、DML、DQL)

Different lower_case_table_names settings for server (‘1‘) and data dictionary (‘0‘) 解决方案

【图像处理】基于中轴变换实现图像骨架提取附matlab代码

go版本升级
随机推荐
MySQL安装配置教程(超级详细)
mysql basics (4)
PyCharm usage tutorial (more detailed, picture + text)
How MySQL to prepare SQL pretreatment (solve the query IN SQL pretreatment can only query out the problem of a record)
Redis学习
Personal blog system (with source code)
手把手教你彻底卸载MySQL
75. 颜色分类
mysql高阶语句(一)
Nacos 原理
Concurrent Programming Review
参与开源,让程序员找回热血和激情
WeChat payment and payment callback
[GStreamer] 插件的名字要和GST_PLUGIN_DEFINE匹配
idea设置自动带参数的方法注释(有效)
[Redis Master Cultivation Road] Jedis - the basic use of Jedis
子查询作为检索表时的不同使用场景以及是否需要添加别名的问题
报错:npm ERR code EPERM
1475. 商品折扣后的最终价格
MySQL基础(DDL、DML、DQL)