mac 下 mysql 8.0.13 安裝並記錄遇到的問題 以便之後查看

安裝

官網mysql 下載地址mysql

安裝過程 省去sql

安裝好以後 下載navicat數據庫

錯誤1

連接 遇到 mysql 2003 - Can't connect to MySQL server 錯誤,安全

解決方案

重啓mysql 服務

#錯誤2 ERROR 1045: Access denied for user: 'root@localhost' 處理方法。session

##解決方案ui

以安全模式進入數據庫          cd /usr/local/mysql/binthis

            sudo su.net

              而後即可以看到終端命令變成這個開頭: sh-3.2#                輸入一下命令:code

              sh-3.2# ./mysqld_safe --skip-grant-tables &orm

              以後即可以以安全模式進入數據庫了。

另外一個終端

Last login: Sat Dec 15 22:24:07 on ttys000 xiaofengsedeMacBook-Pro:~ xiaofengse$ mysql -u -root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 8.0.13 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> select host,user,authentication_string from mysql.user; +-----------+------------------+------------------------------------------------------------------------+ | host | user | authentication_string | +-----------+------------------+------------------------------------------------------------------------+ | localhost | mysql.infoschema | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | | localhost | mysql.session | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | | localhost | mysql.sys | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | | localhost | root | $A$005$d_3&v_9% TNs692QhsNBvjzKDBaPxZKej3SO68XvGEcnKTeDMVWA | 8Ree*% +-----------+------------------+------------------------------------------------------------------------+ 4 rows in set (0.00 sec)

mysql> user mysql; 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 'user mysql' at line 1 mysql> update user set authentication_string='' where user='root'; ERROR 1046 (3D000): No database selected mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A

Database changed mysql> update user set authentication_string='' where user='root'; Query OK, 1 row affected (0.03 sec) Rows matched: 1 Changed: 1 Warnings: 0

mysql> ALTER user 'root'@'localhost' IDENTIFIED BY 'Root123#'; ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement mysql> ALTER user 'root'@'localhost' IDENTIFIED BY 'Root123#'; ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement mysql> mysql> flush privileges -> ; Query OK, 0 rows affected (0.00 sec)

mysql> ALTER user 'root'@'localhost' IDENTIFIED BY 'Root123#'; Query OK, 0 rows affected (0.07 sec)

mysql> flush privileges; Query OK, 0 rows affected (0.00 sec)

mysql> ALTER user 'root'@'localhost' IDENTIFIED BY 'root'; Query OK, 0 rows affected (0.07 sec)

mysql> flush privileges; Query OK, 0 rows affected (0.00 sec)

mysql>

相關文章
相關標籤/搜索