首页 | 源码下载 | 网站模板 | 网页特效 | 广告代码 | 网页素材 | 字体下载 | 书库
会员投稿 投稿指南 RSS订阅
当前位置:主页>网络编程>Mysql教程>资讯:mysql创建master/slave详细步骤

mysql创建master/slave详细步骤

www.jz123.cn  2011-05-18   来源:   站长家园会员投稿    南京互易中国    我要投递新闻

  尝试安装server

  [justin@xen20-vm04 "]$ rpm -ivh MySQL-server-5.1.51-1.glibc23.x86_64.rpm

  error: Failed dependencies:

  MySQL conflicts with mysql-5.0.45-7.el5.x86_64

  报错冲突

  [justin@xen20-vm04 "]$ rpm -qa | grep -i mysql

  mysql-5.0.45-7.el5

  卸载已有版本

  [justin@xen19-vm04 "]$ rpm -e mysql-5.0.45-7.el5

  error: package mysql-5.0.45-7.el5 is not installed

  进入root用户

  [justin@xen19-vm04 "]$ sudo su -

  Password:

  [root@xen20-vm04 justin]# rpm -e mysql-5.0.45-7.el5

  [root@xen20-vm04 justin]# rpm -qa | grep -i mysql

  现在重新安装

  [root@xen20-vm04 justin]# rpm -ivh MySQL-server-5.1.51-1.glibc23.x86_64.rpm

  Preparing... ########################################### [100%]

  1:MySQL-server ########################################### [100%]

  PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

  To do so, start the server, then issue the following commands:

  /usr/bin/mysqladmin -u root password "new-password"

  /usr/bin/mysqladmin -u root -h xen20-vm04 password "new-password"

  Alternatively you can run:

  /usr/bin/mysql_secure_installation

  which will also give you the option of removing the test

  databases and anonymous user created by default. This is

  strongly recommended for production servers.

  See the manual for more instructions.

  Please report any problems with the /usr/bin/mysqlbug script!

  Starting MySQL.[ OK ]

  安装完成后找不到/ect/my.cnf文件

  Linux下用rpm包安装的MySQL是不会安装/etc/my.cnf文件的,

  至于为什么没有这个文件而MySQL却也能正常启动和作用,在点有两个说法,

  第一种说法,my.cnf只是MySQL启动时的一个参数文件,可以没有它,这时MySQL会用内置的默认参数启动,

  第二种说法,MySQL在启动时自动使用/usr/share/mysql目录下的my-medium.cnf文件,这种说法仅限于rpm包安装的MySQL,

  解决方法,只需要复制一个/usr/share/mysql目录下的.cnf文件到/etc目录,并改名为my.cnf即可


上一篇:浅谈MySQL的存储引擎之表类型存储 下一篇:关于从MySQL转向ADODB的方法

评论总数:0 [ 查看全部 ] 网友评论


关于我们隐私版权广告服务友情链接联系我们网站地图