33.Transaction Check Error:
34. file /usr/share/mysql/charsets/README from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
35. file /usr/share/mysql/charsets/Index.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
36. file /usr/share/mysql/charsets/armscii8.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
37. file /usr/share/mysql/charsets/ascii.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
38. file /usr/share/mysql/charsets/cp1250.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
39. file /usr/share/mysql/charsets/cp1251.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
40. file /usr/share/mysql/charsets/cp1256.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
41. file /usr/share/mysql/charsets/cp1257.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
42. file /usr/share/mysql/charsets/cp850.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
43. file /usr/share/mysql/charsets/cp852.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
44. file /usr/share/mysql/charsets/cp866.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
45. file /usr/share/mysql/charsets/dec8.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
46. file /usr/share/mysql/charsets/geostd8.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
47. file /usr/share/mysql/charsets/greek.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
48. file /usr/share/mysql/charsets/hebrew.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
49. file /usr/share/mysql/charsets/hp8.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
50. file /usr/share/mysql/charsets/keybcs2.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
51. file /usr/share/mysql/charsets/koi8r.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
52. file /usr/share/mysql/charsets/koi8u.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
53. file /usr/share/mysql/charsets/latin1.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
54. file /usr/share/mysql/charsets/latin2.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
55. file /usr/share/mysql/charsets/latin5.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
56. file /usr/share/mysql/charsets/latin7.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
57. file /usr/share/mysql/charsets/macce.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
58. file /usr/share/mysql/charsets/macroman.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
59. file /usr/share/mysql/charsets/swe7.xml from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
60. file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
61. file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
62. file /usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
63. file /usr/share/mysql/english/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
64. file /usr/share/mysql/estonian/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
65. file /usr/share/mysql/french/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
66. file /usr/share/mysql/german/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
67. file /usr/share/mysql/greek/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
68. file /usr/share/mysql/hungarian/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
69. file /usr/share/mysql/italian/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
70. file /usr/share/mysql/japanese/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
71. file /usr/share/mysql/korean/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
72. file /usr/share/mysql/norwegian-ny/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
73. file /usr/share/mysql/norwegian/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
74. file /usr/share/mysql/polish/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
75. file /usr/share/mysql/portuguese/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
76. file /usr/share/mysql/romanian/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
77. file /usr/share/mysql/russian/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
78. file /usr/share/mysql/serbian/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
79. file /usr/share/mysql/slovak/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
80. file /usr/share/mysql/spanish/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
81. file /usr/share/mysql/swedish/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
82. file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-server-community-5.1.58-1.rhel5.i386 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
在网上找了一下,原来是包冲突,conflicts英文就是冲突的意思,呵呵,英文很烂
我把那些冲突 的包全部卸载;
yum -y remove mysql-libs-5.1.52*-y的意思就是不用询问是否remove
卸载完成之后,再安装MySQL成功了,呵呵
yum install MySQL-server-community-5.1.58-1.rhel5.i386.rpm
通常情况下,升级到新版本不需要修改任何数据表。请检查MySQL发布事项中提到的升级需要注意的地方,如果发现不能直接升级的话,就先用mysqldump
将数据导出来,然后再导回去。
如果担心升级失败,就先把旧版本的MySQL改个名字备份起来,以备所需。
同时,升级完之后可能还需要重新编译跟MySQL相关的程序,因为新版本的头文件和库文件可能有改变了。
如果升级后发生问题了,请先检查是否使用了旧的my.cnf配置文件,可以通过执行命令
"mysqld
--print-defaults"
来打印出各种配置信息来确认。
升级的时候最好也升级类似Perl的
DBD::mysql
模块,同样,对PHP和Python而言也是一样。
2、从
MySQL
5.0
升级到
MySQL
5.1
从
5.0
升级到
5.1
的时候,必须要升级授权表。否则,可能某些存储过程无法运行。详情请看附录
"mysql_update
MySQL升级时检查数据表"。
以下是从
5.0
升级到
5.1
需要注意的事项:
检查所有的变化,尤其注意那些标志为
"不兼容的变化"
的部分。详情请看附录
"mysql_update
MySQL升级时检查数据表"
可能某些发布版本会改变授权表的机制
查看所有重大的变化,详情请看MySQL手册的
"D.1.1.?Changes
in
release
5.1.10
(Not
yet
released)"
章节
以下是升级到MySQL
5.1之后会发生的一些变化:
服务器部分:
不兼容的变化:MySQL
5.1
实现了支持无需重启服务器就能在运行时加载或卸载API插件。这个特性需要用到mysql.plugin表,可以运行
"mysql_upgrade"
命令来创建该表
插件安装在系统变量
plugin_dir
所指的目录下。这个变量也控制着用户自定义函数(UDFs)所在目录,这相对以前的版本有所改变。在MySQL
5.1中,所有的UDFs库必须都安装到
plugin_dir
目录下,从旧版本升级的时候,必须把那些库文件都移动到这个目录下
不兼容的变化:系统变量
table_cache
改名为
table_open_cache
不兼容的变化:在MySQL
5.1.6
中
FULLTEXT
的索引结构发生变化了。当升级到
5.1.6
甚至更高之后,需要对每个包含
FULLTEXT
字段的数据表执行
"REPAIR
TABLE"
语句
在
MySQL
5.1.6
以前,MySQL把普通的查询日志和慢查询都写到文件中。从5.1.6以后,这些日志可以灵活地选择是是写到日志文件中(跟以前一样)或者写到
mysql
数据库的
general_log
和
slow_log
表中。如果启用日志记录,这2种方式都可以使用。选项
--log-output
用来控制这2种日志的记录方式
从5.1.6开始,特殊字符集的数据库和表的标识符在创建相应目录和文件时都会用对应的字符集编码了
SQL分
一、下载编译安装#cd /usr/local/src/
#wget http://mysql.byungsoo.net/Downloads/MySQL-5.1/mysql-5.1.38.tar.gz
#tar –xzvf mysql-5.1.38.tar.gz ../software/
#./configure
--prefix=/usr/local/mysql //MySQL安装目录
--datadir=/mydata //数据库存放目录
--with-charset=utf8 //使用UTF8格式
--with-extra-charsets=complex //安装所有的扩展字符集
--enable-thread-safe-client //启用客户端安全线程
--with-big-tables //启用大表
--with-ssl //使用SSL加密
--with-embedded-server //编译成embedded MySQL library (libmysqld.a),
--enable-local-infile //允许从本地导入数据
--enable-assembler //汇编x86的普通 *** 作符,可以提高性能
--with-plugins=innobase //数据库插件
--with-plugins=partition //分表功能,将一个大表分割成多个小表
#make &&make install //编译然后安装
二、新建用户和组
#groupadd mysql //建MySQL组
#useradd -g mysql -s /sbin/nologin mysql //建MySQL用户属于MySQL组
三、配置
#chown -R mysql:mysql /usr/local/mysql/ 把MySQL目录的权限给MySQL用户和组
#cp /usr/local/src/software/ mysql-5.1.38/support-files/my-medium.cnf /etc/my.cnf //拷入配置文件my.cnf
#/usr/local/mysql/bin/mysql_install_db --user=mysql //用MySQL来初始化数据库
#chown -R mysql:mysql /usr/local/mysql/var/ //把初始化的数据库目录给MySQL所有者
#/usr/local/mysql/bin/mysqld_safe --user=mysql &//启动MySQL
四、其他
#cp /usr/local/src/software/ mysql-5.1.38/support-files/mysql.server /etc/init.d/mysqld
#chmod 755 /etc/init.d/mysqld
#chkconfig --add mysqld
#chkconfig mysqld on
#service mysqld restart
五、登陆测试
#cd /usr/local/mysql/bin
#mysql
>show databases
#
MySQL安装结束
linux下mysql配置方法
在linux中mysql的配置文件路径在/usr/share/mysql下
有:my-huge.cnf 、my-large.cnf、 my-medium、my-small.cnf这些文件
根据需要打开这些文件中的一个:
在文件中找到[mysqld]
在下这行下加入datadir=FILEPATH /*这个路径为数据库存放的路径*/
然后保存文件
在shell中输入
#cp my-***.cnf /etc
#cd /etc
#mv my.cnf my.cnf.bak /*把系统以前的mysql配置文件备份*/
#mv my-***.cnf my.cnf
#service mysqld start /*启动mysql服务*/
#ntsysv /*配置mysql自启动,在d出的窗口中把mysqld这项服务用空格选中,最后确定保存*/
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)