91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Mysql 5.7 CentOS Access denied for user 'root'@'localhost'解決方式

發布時間:2020-08-08 09:51:10 來源:ITPUB博客 閱讀:420 作者:abstractcyj 欄目:MySQL數據庫
在centOS上安裝完mysql, 登錄MYSQL時遇到錯誤
[root@mysql-server Downloads]# mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

關鍵要用MYSQLD_OPTS="--skip-grant-tables"重新啟動mysql服務
[root@mysql-server Downloads]# systemctl stop mysqld
[root@mysql-server Downloads]# systemctl set-enviroment MYSQLD_OPTS="--skip-grant-tables"
Unknown operation 'set-enviroment'.
[root@mysql-server Downloads]# systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"
[root@mysql-server Downloads]# systemctl start mysqld
[root@mysql-server Downloads]# myslq -u root
bash: myslq: command not found...
Similar command is: 'mysql'
[root@mysql-server Downloads]# mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.18 MySQL Community Server (GPL)

Copyright (c) 2000, 2017, 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;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.06 sec)

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=password('root') where user = 'root';
Query OK, 1 row affected, 1 warning (0.07 sec)
Rows matched: 1  Changed: 1  Warnings: 1

mysql> flush previleges;
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 'previleges' at line 1
mysql> flush priviledges;
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 'priviledges' at line 1
mysql> flush privileges;
Query OK, 0 rows affected (0.11 sec)

mysql> quit
Bye
[root@mysql-server Downloads]# systemctl stop mysqld
[root@mysql-server Downloads]# systemctl unset-environment MYSQLD_OPTS
[root@mysql-server Downloads]# systemctl start mysqld
[root@mysql-server Downloads]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.18

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


參考:https://stackoverflow.com/questions/33510184/change-mysql-root-password-on-centos7
向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

西盟| 连平县| 昌平区| 虞城县| 双鸭山市| 平邑县| 驻马店市| 武平县| 义乌市| 苏尼特右旗| 蚌埠市| 隆尧县| 邵阳县| 张家川| 珲春市| 房山区| 屏南县| 高平市| 开化县| 濮阳市| 汪清县| 泰顺县| 镇宁| 汤原县| 股票| 瑞金市| 海林市| 东兰县| 星座| 竹山县| 台州市| 准格尔旗| 梅河口市| 镇原县| 沙洋县| 普兰店市| 潼关县| 马山县| 新沂市| 息烽县| 海安县|