myql 安装后无法登陆

来源:8-1 Mysql安装及链接

qq_煮雨_2

2018-04-21

http://img.mukewang.com/szimg/5adb443c00012fed05500148.jpg

用mysql -u -p 命令也一样,请教一下这是什么情况?

写回答

3回答

赵佳子彧

2019-06-17

因为密码有特殊字符所以用户名和密码不能再同一行输入

登录mysql和退出mysql

[xiaokang@localhost ~]$ mysql -u root -p

Enter password: 

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

[xiaokang@localhost ~]$ mysql -u root -p

Enter password: 

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 14

Server version: 8.0.16


Copyright (c) 2000, 2019, 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> exit

Bye

[xiaokang@localhost ~]$ 


2
1
编程浪子
这个小哥哥的解答是非常正确的。并且这个小哥哥很活跃哦,非常棒,继续保持这种学习的动力
2019-06-17
共1条回复

丶搁浅

2018-04-26

先看看mysql服务有没有起来

ps -ef | grep mysql

如果没起就开启服务

service mysqld start

1
0

编程浪子

2018-04-28

密码有特殊字符串,建议搜索下就解决了 

http://www.iteye.com/topic/1138262


https://blog.csdn.net/xyylchq/article/details/7476052 

0
0

快速上手Linux 玩转典型应用

以主流CentOS 7 操作系统为例,系统讲解Linux,真实线上环境助你快速上手,独立配置运维服务器

1663 学习 · 572 问题

查看课程