入門linux基礎之mysql基礎篇

2021-10-04 00:00:59 字數 839 閱讀 7094

mysql建立使用者?需要注意什麼?如:user3@localhost

create user 『user3』@『localhost』 identified by 『qianfeng@123』;

mysql刪除用?

drop user 『user3』@『localhost』

mysql查詢使用者?

select user,host from mysql.user;』

mysql改密碼?

(1)[root@localhost ~]mysqladmin -uroot -p』qianfeng@123』 password 『qianfeng@1234』

(2)mysql> set password=password(『qianfeng@123』);

(3)mysql>

update mysql.user

setauthentication_string = password(『qianfeng@12345』)

where

user=『root』

andhost=『localhost』

超級管理員破解mysql的root賬戶密碼?

1.修改mysql配置檔案

vi /etc/my.cnf

skip-grant-tables

2.重啟mysql

systemctl restart mysqld

3.免密登入

mysql

4.修改密碼(略)

5.注釋掉跳過密碼的配置。並重啟。

#skip-grant-tables

[root@localhost ~]systemctl restart mysqld

Linux入門基礎之檔案

路徑檔案操作 家目錄概念 目錄 資料夾 linux的每乙個資料夾下儲存的東西都是不同,下面簡單介紹以下常見的目錄 bin 存放常用命令 etc 存放系統配置檔案 系統的執行相關的屬性 引數等 lib 存放庫檔案 某個命令的實現。usr 存放系統應用程式及文件,使用者安裝的軟體,或者執行時不經常改變的...

Linux入門之Shell指令碼基礎

shell基本元素 1 bin bash 必須的,指出shell的型別 2 注釋 3 變數 4 控制 乙個shell指令碼 vi mkdir.sh bin bash this is mkdir cd home mkdir shelltest echo shelltest is created.1.e...

mysql基礎入門

登入mysql mysql h ip u使用者名稱 p 或者 mysql u使用者名稱 p密碼 檢視資料庫 show databases 很多資料庫,故databases 其中 information schema mysql perfornance schema資料不能修改,系統自帶 選中乙個資料...