版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 儿童康复区介绍
- T∕CADPA 58-2024 高等教育数字教材出版平台接口技术要求
- 举报网络侵权机制合作协议
- 《宠物医院实务》项目五
- 2026年青岛大学预防医学专业《病理学》科目期末考试卷A
- ZUCC毕业生就业前景
- 锂电池回收行业就业前景
- 安全风险分级管控和隐患排查治理体系培训试题库和答案解析
- 公司法自考试题及答案
- 体育界AI领军人物
- 《高二开学第一课》主题班会课件
- 2020风电场设备事故现场处置方案
- 自考《兽医法规14239》考试复习题库(必备版)
- 《中华民族大团结》(初中)第1课-爱我中华教学课件
- 2021废(污)水处理用复合碳源
- 化学(基础模块)中职PPT完整全套教学课件
- 架空导地线-液压压接(郭学闻)
- 技师培训交直流调速
- 输变电工程项目安全管理台账
- 《高级计量经济学》-厦门大学经济学院
- GB/T 9239.1-2006机械振动恒态(刚性)转子平衡品质要求第1部分:规范与平衡允差的检验
评论
0/150
提交评论