MySQL數(shù)據(jù)庫管理
MySQL數(shù)據(jù)庫的初始化操作 MySQL數(shù)據(jù)庫的初始化操作
安裝MySQL
啟動MySQL
連接與斷開MySQL服務(wù)器
匿名登錄連接
用設(shè)定好的賬戶登錄
“quit”命令斷開
MySQL數(shù)據(jù)庫的維護(hù)
MySQL數(shù)據(jù)庫的用戶權(quán)限設(shè)置
一套非常實用的權(quán)限系統(tǒng)
系統(tǒng)數(shù)據(jù)庫mysql
授權(quán)表
MySQL數(shù)據(jù)庫的初始權(quán)限
超級用戶root
匿名用戶
MySQL數(shù)據(jù)庫的用戶權(quán)限設(shè)置命令
為root用戶設(shè)置口令
mysqladmin -u root password "passwd“
root用戶有口令后運行MySQL:
mysql –h hostname –u root -p
Enter password:
需要鍵入正確的密碼才能連接成功。
建立其他訪問權(quán)限的用戶
grant privileges on what to user identified by "passwd" with grant option
查看用戶權(quán)限
以root用戶身份連接MySQL數(shù)據(jù)庫后依次執(zhí)行“use mysql;”、“show tables;”和“select * from user;”
Mysql數(shù)據(jù)庫的備份與恢復(fù)
使用mysqldump命令備份數(shù)據(jù)庫
備份數(shù)據(jù)庫
mysqldump [OPTIONS] database [tables]
恢復(fù)數(shù)據(jù)庫
恢復(fù)數(shù)據(jù)庫首先對原庫進(jìn)行刪除,然后重新創(chuàng)建該庫
使用直接拷貝數(shù)據(jù)庫文件的方法備份數(shù)據(jù)庫
必須保證表不在被使用
MySQL數(shù)據(jù)庫的客戶端命令操作
MySQL數(shù)據(jù)庫的客戶端命令
可以在/usr/bin下找到MySQL的實用程序
查看數(shù)據(jù)庫數(shù)據(jù)
show databases;
use 數(shù)據(jù)庫名;
show tables;
select 字段1,字段2,字段3 from 表名;
數(shù)據(jù)庫的創(chuàng)建與刪除
創(chuàng)建
create database 數(shù)據(jù)庫名;
刪除
drop database數(shù)據(jù)庫名;
數(shù)據(jù)庫表的創(chuàng)建、查看表結(jié)構(gòu)及刪除表
創(chuàng)建一個表,要明確表的結(jié)構(gòu),即表字段名稱、字段類型、長度及主鍵等信息。
查看表的結(jié)構(gòu)用“describe 表名;“
刪除表用“drop table表名;”
數(shù)據(jù)記錄的增加、刪除與修改
用insert、update和delete語句分別進(jìn)行增加一條新記錄、修改和刪除記錄
例:
mysql> insert into user
-> values('2','李四','666999','lisi@163.com');
mysql> update user set passwd='2008' where id=1;
mysql> delete from user where id=2;
MySQL數(shù)據(jù)庫基于Web方式的遠(yuǎn)程管理
phpMyAdmin安裝配置
phpMyAdmin的客戶端訪問
MySQL數(shù)據(jù)庫基于GUI方式的遠(yuǎn)程管理
MySQL Control Center簡介
MySQL Control Center的安裝
MySQL Control Center的連接MySQL數(shù)據(jù)庫
2015職稱計算機(jī)考試書PowerPoint2007中 .. 定價:¥45 優(yōu)惠價:¥42 更多書籍 | |
2015年全國職稱計算機(jī)考試教材(2007模 .. 定價:¥225 優(yōu)惠價:¥213 更多書籍 |