美文网首页
MySql___(2) MySQL 连接

MySql___(2) MySQL 连接

作者: 岁月静好浅笑安然 | 来源:发表于2019-08-22 17:24 被阅读0次

MySql连接

使用命令提示符(管理员)连接

实例

打开cmd命令提示符(管理员)连接,开启mysql 服务

C:\Windows\system32>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。

命令行中连接mysql

C:\Windows\system32>mysql -u root -p
Enter password: *********

登录成功,输出

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.24 MySQL Community Server (GPL)
Copyright (c) 2000, 2015, 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>

密码错误,登录失败

C:\Windows\system32>mysql -u root -p
Enter password: *********
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

退出

mysql>quit
Bye

相关文章

网友评论

      本文标题:MySql___(2) MySQL 连接

      本文链接:https://www.haomeiwen.com/subject/qylosctx.html