1、mysql下载地址下载地址: https://dev.mysql.com/downloads/windows/installer/8.0.html
2、更改加密方式:
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
更改密码:该例子中 123为新密码
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123';
刷新:
mysql> FLUSH PRIVILEGES;
4、mysql 输入show databases 没反应
一句话
不要忘记使用MySQL时在命令后加**;**
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>mysqladmin --version
mysqladmin Ver 8.0.17 for Win64 on x86_64 (MySQL Community Server - GPL)
C:\Users\Administrator>mysqal -u root -p
'mysqal' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
C:\Users\Administrator>mysql -u root -p
Enter password: ***
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 70
Server version: 8.0.17 MySQL Community Server - GPL
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> show databases
-> SHOW DATABASES
-> show databases
-> show myschool
-> use runoob
-> show databases
-> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'SHOW
DATABASES
show databases
show myschool
use runoob
show databases
show datab' at line 2
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)