版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、車(chē)險(xiǎn)信息共享平臺(tái)MySQL的安裝和配置獲取MySQL Server和ClientSuSE Linux Enterprise Server 9 RPM (x86) downloads的Server和SuSE Linux Enterprise Server 9 RPM (x86) downloads的Client。放到/root/Desktop目錄下。在客戶(hù)PC上由可視化工具進(jìn)行操作,這里使用Xmanager2.0進(jìn)行操作。進(jìn)入/root/Desktop目錄,執(zhí)行l(wèi)s命令,顯示如下:安裝MySQL Server和Client執(zhí)行下面命令進(jìn)行MySQL Server和MySQL的Client的安裝,
2、安裝過(guò)程顯示如下。rpm -ivh MySQL-server-standard-rpm -ivh MySQL-client-standard-修改root原始密碼將MySQL的root的原始密碼空改為root,執(zhí)行“mysqladmin -u root password root”;登錄MySQL可以執(zhí)行“mysql -h localhost -u root proot”。查看現(xiàn)有用戶(hù)查看現(xiàn)有用戶(hù),登錄MySQL后執(zhí)行“select host, user from mysql.user;”刪除匿名用戶(hù)刪除匿名用戶(hù),執(zhí)行“delete from mysql.user where user = ;
3、” 再執(zhí)行flush privileges;然后查看現(xiàn)有用戶(hù)。圖5添加新用戶(hù)添加新用戶(hù),執(zhí)行“GRANT ALL PRIVILEGES ON *.* TO sinoiactlocalhost IDENTIFIED BY password WITH GRANT OPTION;”和“GRANT ALL PRIVILEGES ON *.* TO sinoiact% IDENTIFIED BY password WITH GRANT OPTION; ”。然后再查看用戶(hù)顯示如下:圖6服務(wù)參數(shù)配置啟動(dòng)服務(wù):service mysql start停止服務(wù):service mysql stop 或者mysql
4、admin shutdown u root proot 同時(shí),根據(jù)medium的配置得到環(huán)境參數(shù):/var/lib/mysql/,如下。# The following options will be passed to all MySQL clientsclientdefault-character-set=gbk#password= your_passwordport= 3306so# Here follows entries for some specific programs# The MySQL servermysqlddefault-character-set=gbkdefault-
5、storage-engine=INNODBmax_connections=80port= 3306skip-lockingkey_buffer = 16Mmax_allowed_packet = 1Mtable_cache = 64sort_buffer_size = 512Knet_buffer_length = 8Kread_buffer_size = 256Kread_rnd_buffer_size = 512Kmyisam_sort_buffer_size = 8M# Dont listen on a TCP/IP port at all. This can be a security
6、 enhancement,# if all processes that need to connect to mysqld run on the same host.# All interaction with mysqld must be made via Unix sockets or named pipes.# Note that using this option without enabling named pipes on Windows# (via the enable-named-pipe option) will render mysqld useless!# #skip-
7、networking# Replication Master Server (default)# binary logging is required for replicationlog-bin=mysql-bin# required unique id between 1 and 232 - 1# defaults to 1 if master-host is not set# but will not function as a master if omittedserver-id= 1# Replication Slave (comment out master section to
8、use this)# To configure this host as a replication slave, you can choose between# two methods :# 1) Use the CHANGE MASTER TO command (fully described in our manual) -# the syntax is:# CHANGE MASTER TO MASTER_HOST=, MASTER_PORT=,# MASTER_USER=, MASTER_PASSWORD= ;# where you replace , , by quoted stri
9、ngs and# by the masters port number (3306 by default).# Example:# CHANGE MASTER TO MASTER_HOST=125.564.12.1, MASTER_PORT=3306,# MASTER_USER=joe, MASTER_PASSWORD=secret;# OR# 2) Set the variables below. However, in case you choose this method, then# start replication for the first time (even unsucces
10、sfully, for example# if you mistyped the password in master-password and the slave fails to# connect), the slave will create a file, and any later# change in this file to the variables values below will be ignored and# overridden by the content of the file, unless you shutdow
11、n# the slave server, delete and restart the slaver server.# For that reason, you may want to leave the lines below untouched# (commented) and instead use CHANGE MASTER TO (see above)# required unique id between 2 and 232 - 1# (and different from the master)# defaults to 2 if master-host
12、is set# but will not function as a slave if omitted#server-id = 2# The replication master for this slave - required#master-host = # The username the slave will use for authentication when connecting# to the master - required#master-user = # The password the slave will authenticate with when connecti
13、ng to# the master - required#master-password = # The port the master is listening on.# optional - defaults to 3306#master-port = # binary logging - not required for slaves, but recommended#log-bin=mysql-bin# Point the following paths to different dedicated disks#tmpdir= /tmp/#log-update = /path-to-d
14、edicated-directory/hostname# Uncomment the following if you are using BDB tables#bdb_cache_size = 4M#bdb_max_lock = 10000# Uncomment the following if you are using InnoDB tablesinnodb_data_home_dir = /var/lib/mysql/innodb_data_file_path = ibdata1:10M:autoextendinnodb_log_group_home_dir = /var/lib/my
15、sql/innodb_log_arch_dir = /var/lib/mysql/# You can set ._buffer_pool_size up to 50 - 80 %# of RAM but beware of setting memory usage too highinnodb_buffer_pool_size = 16Minnodb_additional_mem_pool_size = 2M# Set ._log_file_size to 25 % of buffer pool sizeinnodb_log_file_size = 5Minnodb_log_buffer_si
16、ze = 8Minnodb_flush_log_at_trx_commit = 1innodb_lock_wait_timeout = 50mysqldumpquickmax_allowed_packet = 16Mmysqldefault-character-set=gbkno-auto-rehash# Remove the next comment character if you are not familiar with SQL#safe-updatesisamchkkey_buffer = 20Msort_buffer_size = 20Mread_buffer = 2Mwrite_
17、buffer = 2Mmyisamchkkey_buffer = 20Msort_buffer_size = 20Mread_buffer = 2Mwrite_buffer = 2Mmysqlhotcopyinteractive-timeout創(chuàng)建數(shù)據(jù)庫(kù)創(chuàng)建數(shù)據(jù)庫(kù) sinoiact,執(zhí)行“CREATE DATABASE sinoiact DEFAULT CHARACTER SET gbk DEFAULT COLLATE gbk_chinese_ci;”然后顯示所有數(shù)據(jù)庫(kù)如下:圖7到此,在linux上創(chuàng)建數(shù)據(jù)庫(kù)完畢。接下來(lái),在客戶(hù)端PC上使用MySQL Administrator進(jìn)行相關(guān)操作圖8給用戶(hù)賦予權(quán)限登錄后,選擇User Administration,在下面選中sinoiact用戶(hù),在右邊選中sinoiact數(shù)據(jù)庫(kù),再給它完全的權(quán)限(把所有的available privileges都加到assigned privileges中)。圖9建表及加載初始化數(shù)據(jù)然后在客戶(hù)PC上,執(zhí)行附件中的腳本:sinoiact_mysql d來(lái)建表及加載初始化數(shù)據(jù),選擇Catalogs的Schema Tables,點(diǎn)擊Refresh,顯示如下圖10到此,在SuSE Linux上MySQL的安裝、配置、建庫(kù)、建表、導(dǎo)入初始化數(shù)據(jù)、連接、測(cè)試已經(jīng)完成。相關(guān)說(shuō)明:關(guān)于建表和
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 景區(qū)門(mén)票退票手續(xù)規(guī)范制度
- 河南省新鄉(xiāng)市2026屆高二上生物期末達(dá)標(biāo)檢測(cè)模擬試題含解析
- 食品企業(yè)衛(wèi)生監(jiān)控制度
- 2026安徽蚌埠自貿(mào)區(qū)城發(fā)人力資源有限公司第一期招聘6人備考題庫(kù)及完整答案詳解1套
- 2026上半年重慶事業(yè)單位聯(lián)考重慶市屬單位招聘高層次和緊缺人才310人備考題庫(kù)完整答案詳解
- 2026廣東深圳市福田區(qū)總工會(huì)招聘工會(huì)社會(huì)工作者6人備考題庫(kù)及答案詳解參考
- 2026對(duì)外經(jīng)濟(jì)貿(mào)易大學(xué)事業(yè)編專(zhuān)職輔導(dǎo)員、其他專(zhuān)技人員招聘?jìng)淇碱}庫(kù)及完整答案詳解1套
- 2026內(nèi)蒙古昌都市丁青縣消防救援大隊(duì)補(bǔ)招政府專(zhuān)職消防員4人備考題庫(kù)及答案詳解參考
- 2026四川巴中市通江產(chǎn)業(yè)投資集團(tuán)有限公司及下屬企業(yè)招聘11人備考題庫(kù)及答案詳解一套
- 銀行票據(jù)管理財(cái)務(wù)制度
- 市政管網(wǎng)工程投標(biāo)方案(技術(shù)方案)
- JT∕T 1496-2024 公路隧道施工門(mén)禁系統(tǒng)技術(shù)要求
- 2024版美團(tuán)商家合作協(xié)議合同范本
- 一年級(jí)上冊(cè)數(shù)學(xué)應(yīng)用題50道(重點(diǎn))
- 嵌入式系統(tǒng)實(shí)現(xiàn)與創(chuàng)新應(yīng)用智慧樹(shù)知到期末考試答案章節(jié)答案2024年山東大學(xué)
- 線纜及線束組件檢驗(yàn)標(biāo)準(zhǔn)
- 人教部編版語(yǔ)文三年級(jí)下冊(cè)生字表筆順字帖可打印
- 口述史研究活動(dòng)方案
- 房屋租賃合同txt
- 珍稀植物移栽方案
- THBFIA 0004-2020 紅棗制品標(biāo)準(zhǔn)
評(píng)論
0/150
提交評(píng)論