導航:首頁 > 操作系統 > linux資料庫許可權

linux資料庫許可權

發布時間:2022-07-24 02:25:06

❶ mysql資料庫在linux上的不同登錄方式和許可權

1.
mysql資料庫
,忘記root
用戶登錄
密碼。
解決如下:
a.重置密碼
#/etc/init.d/mysqld
stop
#mysqld_safe
--user=mysql
--skip-grant-tables
--skip-networking
&
#mysql
-u
root
mysql
mysql>
UPDATE
user
SET
Password=PASSWORD('newpassword')
where
USER='root';
mysql>
FLUSH
PRIVILEGES;
mysql>
quit;
b.使用新密碼登錄
#mysql
-u
root
-pnewpassword
2.遠程登錄許可權
mysql>
GRANT
ALL
PRIVILEGES
ON
*.*
TO
'myuser'@'%'
IDENTIFIED
BY
'mypassword'
WITH
GRANT
OPTION;
mysql>
FLUSH
PRIVILEGES;
上面授權是允許myuser用戶,從任何機器都能訪問mysql伺服器。
%代表任何客戶端,也可以是
localhost
,或者是某一ip地址。

❷ linux用命令怎麼修改mysql用戶的許可權

mysql更改用戶許可權
This entry was posted by admin Monday, 26 April, 2010
1.「grant all on *.* to root@』%』 identified by 『yourpassword』;」——這個還可以順帶設置密碼。
2.「flush privileges; 」——刷新一下,讓許可權生效。
mysql的一些其他的管理,可以用mysqladmin命令。可以用來設置密碼什麼的。
grant方面的詳細信息可以看我下面的轉載:
本文實例,運行於 MySQL 5.0 及以上版本。
MySQL 賦予用戶許可權命令的簡單格式可概括為:
grant 許可權 on 資料庫對象 to 用戶
一、grant 普通數據用戶,查詢、插入、更新、刪除 資料庫中所有表數據的權利。
grant select on testdb.* to common_user@』%』
grant insert on testdb.* to common_user@』%』
grant update on testdb.* to common_user@』%』
grant delete on testdb.* to common_user@』%』
或者,用一條 MySQL 命令來替代:
grant select, insert, update, delete on testdb.* to common_user@』%』

❸ linux mysql 如何查看用戶與資料庫之間的許可權關系

bin目錄是mysql控製程序所在的目錄,比如mysql的啟動,mysql的備份命令都在這個目錄下面。資料庫肯定要有一個用戶
,這個用戶就是user,對應的密碼就password。後面的name就是生成的備份文件名。

❹ linux中安裝mysql,如何開啟遠程訪問許可權

1、登陸mysql

mysql -u root -p

2、改表法:修改mysql庫的user表,將host項,從localhost改為%。%這里表示的是允許任意host訪問,如果只允許某一個ip訪問,則可改為相應的ip,比如可以將localhost改為192.168.1.123,這表示只允許區域網的192.168.1.123這個ip遠程訪問mysql。

mysql> USE MYSQL;mysql> UPDATE USER SET host = '%' WHERE user = 'root';

3、授權法:

mysql> USE MYSQL;mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION //賦予任何主機訪問以及修改所有數據的許可權 例如,你想root用戶使用root從任何主機連接到mysql伺服器的話。GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;如果你想允許用戶root從ip為192.168.1.123的主機連接到mysql伺服器,並使用root作為密碼GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.1.123'IDENTIFIED BY 'root' WITH GRANT OPTION;mysql> FLUSH PRIVILEGES //

❺ Linux下MYSQL 資料庫許可權問題如何解決

那就是資料庫許可權的問題,而不是linux,資料庫是分許可權滴,有的可讀,有的可寫,有的只讓你讀某個表。。。。總之資料庫也是許可權嚴格,確認你是賬號密碼沒問題?如果是最高許可權無法進入,建議重新安裝(如果沒數據的話)。
去看看lamp相關教程!弄個phpmyadmin,可視化,就像mssql那麼簡單處理!

❻ linux mysql 資料庫許可權

hi 樓主,在資料庫中創建包含很多,視圖,索引,臨時表的創建許可權都能分開賦予,你可以執行 show privileges 來查看許可權參數,我這邊就以創建表為例,只包含查詢表功能,其他修改,刪除,備份沒有許可權;以下是步驟:
1,create user 'tom'@'%' identified by '123456';---創建用戶,無許可權;
2, grant create,select on wangxh2.* to tom;-----把wangxh2庫的所有表的創建和查詢賦予tom
3,flush privileges;-----刷新許可權表才能起效
接下來是測試:
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test |
| wangxh2 |
+--------------------+
3 rows in set (0.06 sec)

mysql> use wangxh2
Database changed
mysql> show tables;
+-------------------+
| Tables_in_wangxh2 |
+-------------------+
| test |
+-------------------+
1 row in set (0.00 sec)

mysql> drop test;
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 'test' at line 1
mysql> drop table test;
ERROR 1142 (42000): DROP command denied to user 'tom'@'localhost' for table 'test'
mysql> select count(*) from test;
+----------+
| count(*) |
+----------+
| 33554432 |
+----------+
1 row in set (0.01 sec)

mysql> insert into test values(1);
ERROR 1142 (42000): INSERT command denied to user 'tom'@'localhost' for table 'test'
mysql> delete from test;
ERROR 1142 (42000): DELETE command denied to user 'tom'@'localhost' for table 'test'
mysql> update test set id=1;
ERROR 1142 (42000): UPDATE command denied to user 'tom'@'localhost' for table 'test'
mysql> create table test1 (id int);
Query OK, 0 rows affected (0.02 sec)

mysql> insert into test1 values(1);
ERROR 1142 (42000): INSERT command denied to user 'tom'@'localhost' for table 'test1'

[mysql@localhost ~]$ mysqlmp -u tom -paidengshan wangxh2 >/home/mysql/aa.sql
mysqlmp: Got error: 1044: Access denied for user 'tom'@'%' to database 'wangxh2' when using LOCK TABLES
[mysql@localhost ~]$
-----------------------------------------------------------------------------------------

以上測試發現,tom對wangxh2有建表,查詢表的許可權,但是修改,刪除,新增,備份都沒有許可權,達到你的需求了

❼ linux怎麼給oracle中用戶許可權

--//給用戶授予許可權
grant connect,resource to test;
--//刪除表空間
drop tablespace test_temp including CONTENTS and datafiles;
--//修改用戶密碼
alter user test identified by new_password;
--//刪除用戶
drop user 用戶名 cascade; --//執行該語句請小心,會級聯刪除該用戶下所有對象。
--//給用戶分配許可權
SQL> grant connect to test_user;
SQL> grant resource to test_user;
SQL> grant create view to test_user;
SQL> GRANT DEBUG CONNECT SESSION TO test_user;
SQL> GRANT DEBUG ANY PROCEDURE TO test_user;

實例如下:
資料庫用戶的創建、許可權的分配
資料庫安裝完成後,有兩個系統級的用戶:
1、system 默認密碼為:manager
2、sys 默認密碼為:change_on_install
在安裝的資料庫目錄中找到\oracle\proct\9.2\bin 中的sqlplus程序,運行:./sqlplussystem/manager@ora9i
用system用戶創建自己的用戶、許可權;sql語句如下:
1、創建用戶:
create user username identified by pwd default tablespace users Temporary TABLESPACE Temp;
2、用戶授權
grant connect,resource,dba to business;
3、提交
commit;

❽ 怎樣設置linux上db2資料庫的遠程訪問許可權

DB2連接遠程資料庫實例的步驟 一: 開始菜單--------運行--------輸入地db2cmd地,進入DB2命令行處理器,如下圖: 二:輸入地db2地,進入命令處理狀態,如下圖: 三:輸入 CATALOG TCPIP NODE nodeone REMOTE 192.9.107.64 SERVER 50000 remote_instance db2admin 注:其中nodeone為自己取的節點名稱,192.9.107.64為遠程資料庫的IP地址,db2admin為遠程資料庫的實例.結果如下: 四:輸入 CATALOG DB RONESERV AS testdb AT NODE nodeone 注:其中RONESERV為遠程資料庫的名稱,testdb為該遠程資料庫在本地機器上的別名,nodeone為步驟三中我們建立的節點名稱 五:此時即可像操作本地資料庫一樣操作遠程資料庫了,輸入: connect to testdb user db2admin using lianxi 注:其中testdb為我們在步驟四中為遠程資料庫指定的別名,db2admin為遠程資料庫的用戶名,lianxi為遠程資料庫的密碼 此時您可看到,DB2的控制中心能像操作本地資料庫一樣操作遠程資料庫了.

❾ linux下,新增一個用戶並賦予連接資料庫許可權是什麼命令

命令行下
useradd -g 你的資料庫用戶組名 你的用戶名
這樣你的用戶名就有許可權使用資料庫了。
資料庫用戶組 可以 group -l 看看。

閱讀全文

與linux資料庫許可權相關的資料

熱點內容
java面試邏輯 瀏覽:738
如何下載全英文app 瀏覽:721
js函數式編程指南 瀏覽:378
為什麼安卓手機相機啟動會卡 瀏覽:339
python中t是什麼意思 瀏覽:762
移動硬碟內存加密 瀏覽:405
單片機測角度 瀏覽:862
URL伺服器地址怎麼填 瀏覽:436
壓縮餅干會導致血糖高嗎 瀏覽:567
cad中xc命令怎麼用 瀏覽:422
戴爾伺服器怎麼看網卡介面 瀏覽:821
鹽鐵論pdf 瀏覽:422
最短路徑的生成演算法可用 瀏覽:455
蘋果備忘錄怎麼不能加密了 瀏覽:624
殺掉java進程命令 瀏覽:990
汽車不開壓縮機能製冷嘛 瀏覽:431
碰碰球模擬器安卓怎麼下載 瀏覽:449
usb口加密只進不出設置 瀏覽:12
shell腳本編程35講視頻教程 瀏覽:62
阿里雲解析到私有伺服器 瀏覽:371