平台实施文档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

提交评论