当前位置:网站首页>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业界推荐自学好书
(点击左下方“阅读原文”了解详情)
往期推荐

边栏推荐
- Explain in detail the differences between opentsdb and tdengine in system functions
- (5) SPI application design and simulation verification 1 - logic sorting
- Synchronization mechanism of dual namenodes
- Advanced learning of MySQL -- Application -- Optimization of other SQL statements
- Optimal binary search tree
- 黑马程序员-软件测试基础班-02-30-45工具代开浏览器运行代码,音、视频、测试点,音视频标签,布局标签。超链接语法进阶,绝对路径,相对路径
- LACP details
- Push NFT out of the regulatory dilemma, and BSN launched NFT supporting infrastructure network
- Application of scaleflux CSD 2000 in Ctrip
- 软件测试学习-黑马程序员,软件测试学习大纲
猜你喜欢

Simple anti shake for wechat applet

Wechat applet map displays the current position with annotation
![[leetcode] 2. Add two numbers (user-defined listnode), medium](/img/27/1e7ce0e08d7428f0f594a3477e35df.jpg)
[leetcode] 2. Add two numbers (user-defined listnode), medium

Three methods to quickly open CMD in a specified folder or place
![[UVM basics] set a monitor at the input port of the DUT to explain the necessity](/img/72/0cecd17ab2c893b978b0995363cfcf.jpg)
[UVM basics] set a monitor at the input port of the DUT to explain the necessity

leetcode 142. Circular linked list II

leetcode 92. Reverse linked list II
![[qt learning notes]qt uses MFC compilation to generate DLL libraries. The problem that DLL cannot be loaded occurs on computers without programming environment](/img/fb/4cf7013687973a7214e51faf3358c0.jpg)
[qt learning notes]qt uses MFC compilation to generate DLL libraries. The problem that DLL cannot be loaded occurs on computers without programming environment

Wanzhou gold industry: a common technical term in gold t+d transaction?

d3dx9_ How to repair 38.dll? d3dx9_ 38. How to download a missing DLL?
随机推荐
Oracle的NUMBER长度超过19之后,实体使用Long映射,导致出现问题是为什么?
Advanced learning of MySQL -- Application -- Optimization of other SQL statements
JS event binding and common events
简历如何去写?
电子智慧套装教程
The power of code refactoring: how to measure the success of refactoring
Why should string be designed to be immutable?
09 route guard authenticates URL
Awk determines whether the first column is greater than 1. If it is greater than 1, the row will be printed
(POJ - 1847) tram (shortest circuit)
leetcode 92. Reverse linked list II
GAC Mitsubishi's new outlander made its first domestic debut in the year, and its product strength was fully renewed
Leetcode 33. Search rotation sort array
黑马程序员-软件测试基础班-02-30-45工具代开浏览器运行代码,音、视频、测试点,音视频标签,布局标签。超链接语法进阶,绝对路径,相对路径
About redis master-slave replication
[UVM foundation] can only be used in build_ Research on executing instantiation action in phase
Wechat applet payment countdown
Jeesite 4.0 replaces the default view style and customizes the theme
Redis系列2:数据持久化提高可用性
Use lamda expression and stream flow to traverse map and list