当前位置:网站首页>MySQL数据库登录和退出的两种方式
MySQL数据库登录和退出的两种方式
2022-06-27 16:16:00 【墨天轮】
点击标题下的千问千知,关注后每天阅读IT刊物
MySQL数据库在启动以后,我们接下来的操作就是登录并使用MySQL数据库,那么我们如何来登录和退出MySQL数据库呢?
接下来千千小姐姐为大家整理了两种登录和退出MySQL数据库的方法,具体如下所示:
一、直接使用命令执行登录和退出
1、打开DOS命令行窗口,输入“mysql –uroot -p”命令,再输入密码,则成功登录MySQL数据库,如图所示:

2、输入“show databases;”命令查看数据库中所有的库,如图所示:

3、输入“exit;”命令即可退出MySQL数据库,如图所示:

二、使用Command Line Client登录和退出MySQL数据库
1、单击“开始—程序—MySQL—点击“MySQL Server 5.5”,如图所示:

2、单击MySQL 5.5 Command Line Client,如图所示。

3、输入MySQL的登录密码,然后按回车键,此时成功登录MySQL数据库,如图所示。

4、退出MySQL数据库的方式与使用DOS命令行的退出的方式一致。
(输入“exit;”命令即可退出MySQL数据库)

两种方法对比DOS命令行窗口登录和退出MySQL比较烦琐,而使用Command Line Client的方式用户可以更简单的登录MySQL数据库。
大家可以根据自己的喜好来进行选择两种登录MySQL数据库的方法中的一种,但是千千小姐姐建议大家把两种方法都掌握。
如果你在学习MySQL数据库的过程中还有其他问题,欢迎下方留言我们将第一时间给你答复,千问千知与你一起成长。
编程业界推荐好书《MySQL从入门到精通》:

MySQL业界推荐自学好书
(点击左下方“阅读原文”了解详情)
往期推荐

边栏推荐
- 为什么要从 OpenTSDB 迁移到 TDengine
- Dark horse programmer - software testing foundation class -02-30-45 tools open browser running code, audio, video, test points, audio and video labels, layout labels. Advanced hyperlink syntax, absolu
- JS event binding and common events
- [Tang Laoshi] C -- encapsulation: member method
- 428 binary tree (501. mode in binary search tree, 701. insert operation in binary search tree, 450. delete node in binary search tree, 669. prune binary search tree)
- Asemi rectifier bridge kbp307 parameters, kbp307 details, kbp307 pictures
- Repeatedly recognized by authoritative organizations! Smartbi was selected into the top three lists of high-tech and high growth enterprises
- 09 route guard authenticates URL
- TDengine 连接器上线 Google Data Studio 应用商店
- leetcode 70. climb stairs
猜你喜欢

How to create a login interface

d3dx9_ How to repair 38.dll? d3dx9_ 38. How to download a missing DLL?

Related configuration commands of Huawei LACP

国内首家!EMQ加入亚马逊云科技“初创加速-全球合作伙伴网络计划”

Asemi rectifier bridge kbp307 parameters, kbp307 details, kbp307 pictures

All you want to know about large screen visualization is here

Use pyinstaller to package py files into exe. Precautions and error typeerror:_ get_ sysconfigdata_ name() missing 1...‘ check_ Solutions to exists'

Teach you how to realize pynq-z2 bar code recognition

Why should string be designed to be immutable?

Explain the distributed computing of Apache skywalking OAP in detail
随机推荐
Leetcode 5. Longest Palindromic Substring
Performance problems caused by redis cache invalidation and competitive loading
InfluxDB集群功能不再开源,TDengine集群功能更胜一筹
Leetcode 46 Full Permutation
医院预约挂号系统-系统结构
Generate zip package command
Simple anti shake for wechat applet
软件测试-测试的概念,单元测试的详细介绍,如何设计测试用例
Seata server database connection user and service database undo_ What permissions do log users need?
Allocate aligned heap space
GAC Mitsubishi's new outlander made its first domestic debut in the year, and its product strength was fully renewed
Repeatedly recognized by authoritative organizations! Smartbi was selected into the top three lists of high-tech and high growth enterprises
Shardingsphere & Atlas & MYCAT comparison
如何制作登录界面
【ELT.ZIP】OpenHarmony啃论文俱乐部—见证文件压缩系统EROFS
Asemi rectifier bridge kbp310 function pin diagram
Software testing Basics - software testing history, process, classification, benefits, limitations
JXL export Excel
LACP details
(5) SPI application design and simulation verification 1 - logic sorting