日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

mysqladmin 设置用户名初始密码报错you need the SUPER privilege for this operation

發(fā)布時間:2023/12/31 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysqladmin 设置用户名初始密码报错you need the SUPER privilege for this operation 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

今天在linux上安裝了一下mysql5.5,按照mysql5.5 tar包中的INSTALL-BINARY中的instructions一步步坐了下來。

做完以后想要給root用戶配置一下密碼,在網(wǎng)上搜了一下發(fā)現(xiàn)配置密碼的方法是

[root@rac2 ~]# /usr/bin/mysqladmin -u root password root 如是這般

但是我運行了一下發(fā)現(xiàn)會報mysqladmin: Can't turn off logging; error: 'Access denied; you need the SUPER privilege for this operation'的錯誤

再次網(wǎng)上強力搜索之,發(fā)現(xiàn)有個解決方案:http://blog.sina.com.cn/s/blog_6fd605b50100q5es.html

主要思路就是登陸mysql之后對mysql系統(tǒng)的數(shù)據(jù)庫進行操作,更新User表中root用戶相對應(yīng)的密碼

我locate了一下該博文中說的my.cnf文件發(fā)現(xiàn)好像沒啥用的樣子

所以我也就沒有完全按照該博文講的一步步坐下來,而是直接殺入mysql數(shù)據(jù)庫進行更新操作

[root@localhost Anylinux]# mysql

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 3.23.56

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

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 Password = password ( 'anylinux' ) WHERE User = 'root' ;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 2 Changed: 0 Warnings: 0

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

mysql> quit
Bye

?

看了一下感覺有了點思路,后來有需要在mysql里面創(chuàng)建一個用戶,

于是到網(wǎng)上搜mysql創(chuàng)建用戶名的方法搜到了一個比較標準的方法:

?

http://www.databasef1.com/tutorial/mysql-create-user.html

CREATE USER 'user1'@'localhost' IDENTIFIED BY 'pass1'; GRANT SELECT,INSERT,UPDATE,DELETE ON *.* TO 'user1'@'localhost'; GRANT ALL ON *.* TO 'user1'@'localhost';

用上面第一句和第三句就完全搞定了


轉(zhuǎn)載于:https://www.cnblogs.com/ericsun/archive/2012/03/05/2380622.html

總結(jié)

以上是生活随笔為你收集整理的mysqladmin 设置用户名初始密码报错you need the SUPER privilege for this operation的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。