MySQL 学习笔记-001

MySQL 学习笔记-001

启动服务

以管理员身份运行cmd命令提示符,输入:net start mysql启动服务。

net start mysql
C:\Windows\system32> net start mysql
请求的服务已经启动。

请键入 NET HELPMSG 2182 以获得更多的帮助。

登录MySQL

本地登录: 去到mysql安装位置的bin目录下,并登录mysql,以下以我的电脑安装的为例:
登录语句mysql -u root -p123456 注意:-p与密码之间不能有空格

mysql -u root -p123456
C:\Windows\system32>D:

D:\>cd D:\MySoftwere\mysql-5.7.23-winx64\mysql-5.7.23-winx64\bin

D:\MySoftwere\mysql-5.7.23-winx64\mysql-5.7.23-winx64\bin>mysql -uroot -p123456
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 76
Server version: 5.7.23 MySQL Community Server (GPL)

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

出现如上结果,说明登录已经成功!可以对数据库进行操作了!

猜你喜欢

转载自blog.csdn.net/weixin_44733292/article/details/106968448
今日推荐