平臺實施文檔6-數據庫安裝配置手冊-MySQL For SuSE Linux 1 00【企業廣告傳媒】_第1頁
平臺實施文檔6-數據庫安裝配置手冊-MySQL For SuSE Linux 1 00【企業廣告傳媒】_第2頁
平臺實施文檔6-數據庫安裝配置手冊-MySQL For SuSE Linux 1 00【企業廣告傳媒】_第3頁
平臺實施文檔6-數據庫安裝配置手冊-MySQL For SuSE Linux 1 00【企業廣告傳媒】_第4頁
平臺實施文檔6-數據庫安裝配置手冊-MySQL For SuSE Linux 1 00【企業廣告傳媒】_第5頁
已閱讀5頁,還剩3頁未讀 繼續免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、車險信息共享平臺MySQL的安裝和配置獲取MySQL Server和ClientSuSE Linux Enterprise Server 9 RPM (x86) downloads的Server和SuSE Linux Enterprise Server 9 RPM (x86) downloads的Client。放到/root/Desktop目錄下。在客戶PC上由可視化工具進行操作,這里使用Xmanager2.0進行操作。進入/root/Desktop目錄,執行ls命令,顯示如下:安裝MySQL Server和Client執行下面命令進行MySQL Server和MySQL的Client的安裝,

2、安裝過程顯示如下。rpm -ivh MySQL-server-standard-rpm -ivh MySQL-client-standard-修改root原始密碼將MySQL的root的原始密碼空改為root,執行“mysqladmin -u root password root”;登錄MySQL可以執行“mysql -h localhost -u root proot”。查看現有用戶查看現有用戶,登錄MySQL后執行“select host, user from mysql.user;”刪除匿名用戶刪除匿名用戶,執行“delete from mysql.user where user = ;

3、” 再執行flush privileges;然后查看現有用戶。圖5添加新用戶添加新用戶,執行“GRANT ALL PRIVILEGES ON *.* TO sinoiactlocalhost IDENTIFIED BY password WITH GRANT OPTION;”和“GRANT ALL PRIVILEGES ON *.* TO sinoiact% IDENTIFIED BY password WITH GRANT OPTION; ”。然后再查看用戶顯示如下:圖6服務參數配置啟動服務:service mysql start停止服務:service mysql stop 或者mysql

4、admin shutdown u root proot 同時,根據medium的配置得到環境參數:/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創建數據庫創建數據庫 sinoiact,執行“CREATE DATABASE sinoiact DEFAULT CHARACTER SET gbk DEFAULT COLLATE gbk_chinese_ci;”然后顯示所有數據庫如下:圖7到此,在linux上創建數據庫完畢。接下來,在客戶端PC上使用MySQL Administrator進行相關操作圖8給用戶賦予權限登錄后,選擇User Administration,在下面選中sinoiact用戶,在右邊選中sinoiact數據庫,再給它完全的權限(把所有的available privileges都加到assigned privileges中)。圖9建表及加載初始化數據然后在客戶PC上,執行附件中的腳本:sinoiact_mysql d來建表及加載初始化數據,選擇Catalogs的Schema Tables,點擊Refresh,顯示如下圖10到此,在SuSE Linux上MySQL的安裝、配置、建庫、建表、導入初始化數據、連接、測試已經完成。相關說明:關于建表和

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論