![Mysql相關(guān)基礎(chǔ)介紹.pptx_第1頁(yè)](http://file1.renrendoc.com/fileroot2/2020-1/7/67cb5bb2-7cd5-4213-888a-64bdbbb10c3c/67cb5bb2-7cd5-4213-888a-64bdbbb10c3c1.gif)
![Mysql相關(guān)基礎(chǔ)介紹.pptx_第2頁(yè)](http://file1.renrendoc.com/fileroot2/2020-1/7/67cb5bb2-7cd5-4213-888a-64bdbbb10c3c/67cb5bb2-7cd5-4213-888a-64bdbbb10c3c2.gif)
![Mysql相關(guān)基礎(chǔ)介紹.pptx_第3頁(yè)](http://file1.renrendoc.com/fileroot2/2020-1/7/67cb5bb2-7cd5-4213-888a-64bdbbb10c3c/67cb5bb2-7cd5-4213-888a-64bdbbb10c3c3.gif)
![Mysql相關(guān)基礎(chǔ)介紹.pptx_第4頁(yè)](http://file1.renrendoc.com/fileroot2/2020-1/7/67cb5bb2-7cd5-4213-888a-64bdbbb10c3c/67cb5bb2-7cd5-4213-888a-64bdbbb10c3c4.gif)
![Mysql相關(guān)基礎(chǔ)介紹.pptx_第5頁(yè)](http://file1.renrendoc.com/fileroot2/2020-1/7/67cb5bb2-7cd5-4213-888a-64bdbbb10c3c/67cb5bb2-7cd5-4213-888a-64bdbbb10c3c5.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、Mysql,客服中心售后技術(shù)支持,DCBI-3000 Version 3.0 應(yīng)用環(huán)境 Redhat AS3 or Centos 3.9 or Redhat AS5 /mysql 4.1.14-for-as3 DCSM Netcollege應(yīng)用環(huán)境 Redhat AS3 or Centos 5.3 / mysql 5.0.22,數(shù)據(jù)庫(kù)應(yīng)用及環(huán)境,版本4.1.14組成 (Mysql-4.1.14-rhel3.tgz) 安裝方式: 先解壓縮程序包 Tar zxvf Mysql-4.1.14-rhel3.tgz 進(jìn)入文件夾 cd Mysql 執(zhí)行安裝 . /installmsyql 安裝腳本inst
2、allmysql組成內(nèi)容 #!/bin/bash for i in rpm -qa|grep -i mysql ; do (查找是否有數(shù)據(jù)庫(kù)存在) rpm -e $i nodeps (有則卸載) Done rpm -Uvh Mysql4.1.14.Rhel3/MySQL-* -nodeps (安裝文件中的程序包) sleep 1 cp -f f /etc/f (拷貝數(shù)據(jù)庫(kù)配置文件) if ! -e /tmp/mysql.sock ;then ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock (建立鏈接) Fi service mysql resta
3、rt (重啟數(shù)據(jù)庫(kù)服務(wù)),數(shù)據(jù)庫(kù)安裝及應(yīng)用(一),版本5.0.22 rootrh3u8x mysql_5.0.22# ls installmysql mysql-bench-5.0.22-2.1.i386.rpm MySQL-python-1.2.1-1.i386.rpm f mysql-connector-odbc-3.51.12-2.2.i386.rpm mysql-server-5.0.22 -2.1.i386.rpm mysql-5.0.22-2.1.i386.rpm mysql-devel-5.0.22-2.1.i386.rpm mysql-test-5.0.22-2.1.i386.
4、rpm 安裝步驟及方法同4.1.14版本 安裝腳本installmysql內(nèi)容 #!/bin/bash service mysqld stop for i in rpm -qa|grep -i mysql ; do rpm -e $i -nodeps Done echo Uninstall mysql done!“ rpm -Uvh ./mysql-* -nodeps rpm -Uvh ./MySQL-* -nodeps cp -f ./f /etc/f service mysqld restart,數(shù)據(jù)庫(kù)安裝及應(yīng)用(二),查看進(jìn)程 方法1:rootrh3u8x root# ps aux |
5、grep -i mysql root 876 0.0 0.0 5496 160 ? S 02:29 0:00 /bin/sh /usr/bin/mysqld_safe -datadir=/var/lib/mysql -pid-file=/var/lib/mysql/rh3u8x.pid mysql 903 0.4 4.7 613588 17824 ? S 02:29 1:43 /usr/sbin/mysqld -basedir=/ -datadir=/var/lib/mysql -user=mysql -pid-file=/var/lib/mysql/rh3u8x.pid -skip-lock
6、ing -port=3306 -socket=/var/lib/mysql/mysql.sock root 1989 0.0 8.0 704344 30292 ? S 03:49 0:17 ./jre/bin/java -Xms512m -Xmx512m -classpath SysManageServer.jar:mysql-connector-java-3.1.10-bin.jar:log4j-1.2.8.jar -Djava.rmi.server.hostname=6 -Djava.security.policy=file:./rmi.policy -Djava.l
7、ibrary.path=./ server.system.SysManageServer root 15660 0.0 0.1 4932 692 pts/9 S 09:30 0:00 grep -i mysql 方法2:rootrh3u8x root# lsof -i:3306 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME mysqld 17270 mysql 3u IPv4 588535 TCP *:mysql (LISTEN) 強(qiáng)行中止進(jìn)程 kill -9 進(jìn)程號(hào) 服務(wù)控制 rootrh3u8x root# service mysql sto
8、p/start/restart Usage: /etc/init.d/mysql start|stop|restart|reload AS 3操作命令 service mysql start AS 5操作命令 service mysqld start,應(yīng)用(查看,關(guān)閉,服務(wù)控制),備份命令:mysqldump 備份并壓縮: Mysqldump -opt db_name | gzip db_name.gz 恢復(fù)壓縮的文件: gunzip db_name.gz | mysql db_name,應(yīng)用(備份/恢復(fù)),密碼修改 mysqladmin -uroot password “your passw
9、ord“ 權(quán)限管理 添加用戶并授予訪問權(quán) mysql grant all privileges on *.* to userhost IDENTIFIED BY “password”; mysql grant all on *.* to root0; mysql grant all on dcradius.* to root% IDENTIFIED BY “rootpwd”; mysql grant all on dcradius.* to test IDENTIFIED BY “testpwd”; 撤銷訪問權(quán) mysql revoke all on *.*
10、 from userhost 刷新權(quán)限 mysqlflush privileges; DCBI及DCSM 應(yīng)用的管理用戶密碼查看 dcbi的密碼表是OPERATOR dcsm的密碼表是Administrator 在數(shù)據(jù)庫(kù)中執(zhí)行 select * from OPERATOR/Administrator; Mysql數(shù)據(jù)庫(kù)密碼(忘記密碼的解決方法) #killall -TERM mysqld #/usr/bin/safe_mysqld -skip-grant-tables use mysql update user set password=password(your_pass) where us
11、er=“root”; -重置密碼 flush privileges;,應(yīng)用(密碼查看,修改及權(quán)限),如果數(shù)據(jù)庫(kù)出錯(cuò),可以考慮刪除重新安裝 Mysql的安裝路徑可以查看/etc/f 配置文件獲得 刪除安裝的mysql 先關(guān)閉mysql服務(wù) ,然后執(zhí)行 rm -rf /var/lib/mysql 數(shù)據(jù)庫(kù)操作日志 /root/.mysql_history,應(yīng)用 (刪除mysql),應(yīng)用(操作及查詢),登陸數(shù)據(jù)庫(kù): mysql dcradius/dcsm 登陸加密碼的數(shù)據(jù)庫(kù):mysql dcradius/dcsm -uroot -p 顯示數(shù)據(jù)庫(kù): show databases; 顯示表: show t
12、ables; 清空表內(nèi)容 deletefrom表名; 刪除表: Drop table Dcbiuseraccount 顯示表結(jié)構(gòu): desc 表名(USERPARAM/USERACCOUNT) 顯示表內(nèi)容: select *from ACCLIST; 更新字段值 : update USERPARAM SET PASSWORD=admin where USERNAME=tom; 查看統(tǒng)計(jì)數(shù)量:select count(*) from USERLOG_EX; 顯示特定字段:select USERNAME,PASSWORD FROM USERPARAM; 導(dǎo)出特定字段:SELECT USERNAME
13、,USERSTAT FROM USERPARAM INTO OUTFILE Dcbiuserparam.txt; 導(dǎo)入特定數(shù)據(jù)文件:load data infile “Dcbiuserparam.txt” into table Dcbiuserparam; 導(dǎo)出特定數(shù)據(jù)到文件 :select ACCOUNTNAME, ACCSTAT FROM USERACCOUNT INTO OUTFILE “account.txt”; 利用表關(guān)聯(lián)字段顯示多個(gè)表的數(shù)據(jù): select A.name,A.id,OrderF.time from Order,A where Order.service=2 and
14、A.id=Order.user_id and Order.time=2099-12-31 00:00:00; 導(dǎo)入文本中的數(shù)據(jù) load data local infile “123.txt into table dcbi_u;,應(yīng)用(腳本升級(jí)),比較工具軟件:Beyond Compare 2 比較內(nèi)容: 數(shù)據(jù)庫(kù)配置文件db_radius.sql dcsm.sql 使用語(yǔ)句: 添加字段ALTER TABLE table_name ADD COLUMN 。 字段更名ALTER TABLE table_name CHANGE old_field_name create_definition 編輯字段ALTER TABLE table_name MODIFY COLUMN create_definition 添加數(shù)值INSERT INTO ACCSUBJECT VALUES(103
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年膜片式液壓排泥閥項(xiàng)目可行性研究報(bào)告
- 2025至2031年中國(guó)紙顯液行業(yè)投資前景及策略咨詢研究報(bào)告
- 惠州廣東惠州市120急救指揮中心招聘聘用人員筆試歷年參考題庫(kù)附帶答案詳解
- 2025年曬圖紙項(xiàng)目可行性研究報(bào)告
- 2025至2031年中國(guó)多功能專用防水粘合劑行業(yè)投資前景及策略咨詢研究報(bào)告
- 2025年復(fù)合輪套項(xiàng)目可行性研究報(bào)告
- 2025至2031年中國(guó)低壓開關(guān)板行業(yè)投資前景及策略咨詢研究報(bào)告
- 2025至2031年中國(guó)DCS系統(tǒng)專用顯示器行業(yè)投資前景及策略咨詢研究報(bào)告
- 2025至2030年鳥用品項(xiàng)目投資價(jià)值分析報(bào)告
- 2025至2030年鋁手電筒項(xiàng)目投資價(jià)值分析報(bào)告
- 新版中國(guó)食物成分表
- DB11∕T 446-2015 建筑施工測(cè)量技術(shù)規(guī)程
- 運(yùn)輸車輛掛靠協(xié)議書(15篇)
- 完整版:美制螺紋尺寸對(duì)照表(牙數(shù)、牙高、螺距、小徑、中徑外徑、鉆孔)
- 繪本閱讀促進(jìn)幼兒分享與合作行為發(fā)展的研究分析-以中班為例 學(xué)前教育專業(yè)
- 部編人教版五年級(jí)道德與法治下冊(cè)全冊(cè)課件完整版
- 醫(yī)院醫(yī)療質(zhì)量管理制度完整版
- 粵劇課程設(shè)計(jì)
- 食品感官檢驗(yàn)基礎(chǔ)品評(píng)員的崗前培訓(xùn)課件
- AQ/T 2061-2018 金屬非金屬地下礦山防治水安全技術(shù)規(guī)范(正式版)
- 《網(wǎng)絡(luò)安全防護(hù)項(xiàng)目教程》課件項(xiàng)目1 系統(tǒng)基本安全防護(hù)
評(píng)論
0/150
提交評(píng)論