CentOS 6.5下安装MySQL 5.6
解压文件:Tar xvf MySQL-5.6.19-1.linux_glibc2.5.x86_64.rpm-bundle.tar
释放出以下文件:
MySQL-embedded-5.6.19-1.linux_glibc2.5.x86_64.rpmMySQL-devel-5.6.19-1.linux_glibc2.5.x86_64.rpmMySQL-shared-compat-5.6.19-1.linux_glibc2.5.x86_64.rpmMySQL-shared-5.6.19-1.linux_glibc2.5.x86_64.rpmMySQL-server-5.6.19-1.linux_glibc2.5.x86_64.rpmMySQL-client-5.6.19-1.linux_glibc2.5.x86_64.rpmMySQL-test-5.6.19-1.linux_glibc2.5.x86_64.rpm
如下图:
通过lss查看文件名都是红色的,说明文件的访问权限比较高,我们用命令“chmod 777 ./*”将权限改的低一点,
777应该是最低的权限,相当Windows下everyone可读可写可执行,也就是完全控制。
具体可以看一下:chmod 755和chmod 4755的区别
这里只用到了:
MySQL-server-5.6.19-1.linux_glibc2.5.x86_64.rpmMySQL-client-5.6.19-1.linux_glibc2.5.x86_64.rpm
使用以下命令安装:
rpm -ivh MySQL-server-5.6.19-1.linux_glibc2.5.x86_64.rpm
错误提示如下:
Preparing… ########################################### [100%]file /usr/share/mysql/charsets/README from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/english/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/estonian/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/french/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/german/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/greek/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/hungarian/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/italian/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/japanese/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/korean/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/norwegian-ny/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/norwegian/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/polish/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/portuguese/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/romanian/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/russian/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/serbian/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/slovak/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/spanish/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/swedish/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/Index.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/armscii8.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/ascii.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/cp1250.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/cp1251.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/cp1256.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/cp1257.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/cp850.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/cp852.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/cp866.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/dec8.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/geostd8.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/greek.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/hebrew.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/hp8.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/keybcs2.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/koi8r.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/koi8u.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/latin1.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/latin2.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/latin5.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/latin7.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/macce.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/macroman.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64file /usr/share/mysql/charsets/swe7.xml from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64
看到“conflicts”,是产生冲突了,文件“/usr/share/mysql/charsets/*”需要MySQL-server-5.6.19-1.linux_glibc2.5.x86_64版本的,而系统已经存在mysql-libs-5.1.71-1.el6.x86_64版本的!
解决办法:
执行以下命令,删除mysql-libs-5.1.71-1.el6.x86_64:
yum -y remove mysql-libs-5.1.71*
再执行以下命令安装MySQL:
rpm -ivh MySQL-server-5.6.19-1.linux_glibc2.5.x86_64.rpm
一切Ok,安装成功了。
Red Hat Package Manager 是什么意思
RPM(全称为Red Hat Package Manager,亦称为The RPM Package Manager)是在Linux下广泛使用的软件包管理器。 最早由Red Hat研制,现在也由开源社区开发。 RPM通常随附于Linux发行版,在Fedora 、Redhat、Mandriva、SuSE、YellowDog等主流发行版本,以及在这些版本基础上二次开发出来的发行版采用,但也有单独将RPM作为应用软件发行的发行版(例如Gentoo)。 RPM仅适用于安装用RPM来打包的软件,目前是GNU/Linux下软件包资源最丰富的软件包类型。

如何用java连接mysql数据库
;;;;;;;;;publicclassJdbcUtil{privatestaticJdbcUtiljdbcUtil;privateConnectioncon=null;privateStringurl=jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&useSSL=false;privateStringuser=root;privateStringpass=root;privateJdbcUtil(){}static{try{();}catch(ClassNotFoundExceptione){();}}publicConnectiongetConnection(){try{con=(url,user,pass);(false);}catch(SQLExceptione){();}returncon;}publicstaticJdbcUtilgetInstance(){if(jdbcUtil==null){jdbcUtil=newJdbcUtil();}returnjdbcUtil;}publicvoidclose(ResultSetrs,Statementst,Connectioncon){try{if(rs!=null){();}}catch(SQLExceptione){();}try{if(st!=null){();}}catch(SQLExceptione){();}try{if(con!=null){();}}catch(SQLExceptione){();}}publicPreparedStatementgetPs(Connectioncon,Stringsql,)throwsSQLException{PreparedStatementps=(sql);if(objects!=null){for(inti=0,len=;i
如何使用windows远程控制centOS桌面 1.查看本机是否有安装VNC(centOS5默认有安装vnc) rpm -q vnc vnc-server 如果显示结果为: package vnc is not installed vnc-server-4.1.2-14.e15_3.1 那恭喜你,机器上已经安装了vnc,如果没有,就得自己安装了,这里不说怎么安装了,很简单,在centOS的软件库中搜索,点击安装 2.把远程桌面的用户加入到配置文件中 vi /etc/sysconfig/vncservers 使用vi编辑器打开配置文件,在文件中添加下面两行命令 VNCSERVERS=1:root --指定远程用户 VNCSERVERARGS[1]=-geometry 1024x768--指定远程桌面分辨率 3.给你刚刚设置的远程桌面用户 root 设置密码 vncpasswd 4.开启VNC端口 vi /etc/sysconfig/iptables 使用vi编辑器打开配置文件,在文件中添加下面一行命令 -A RH-Firewall-l-INPUT -p TCP -m tcp --dport 5900:5903 -j ACCEPT 5.重启防火墙 service iptables restart 6.修改远程桌面显示配置文件(不修改此文件你看到的远程桌面很简单,相当于命令行操作,为了远程操作如同本地操作一样,务必参考以下方式进行修改) cd ~// vi xstartup 使用vi编辑器打开配置文件,并进行下列修改 #xterm -geometry 80x24+10+10 -ls -title $VNCDESKTOP Desktop & --将它注释,加#代表注释 #twm &--将它注释 gnome-session &--添加它 看了这段代码,大家应该明白是怎么回事了 7.启动vnc服务 /sbin/service vncserver start 8.远程连接 打开vnc客户端,server框中输入ip:1 (1代表上面配置的远程用户代号,配置文件中可以配置多个远程用户),这时你便可以轻松的通过友好的远程桌面来控制centOS了。 9.开机自动启动vnc vi /etc/rc.d/ 使用vi编辑器打开配置文件,并进行下列修改 /etc/init.d/vncserver start --新增行 新增vi编辑器使用方法: vi编辑器分为几种模式 命令模式:光标可以移动,可以复制、可以删除字或行 insert模式:此种模式下才能进行文字输入 (按i键由命令模式进入此模式,按Esc键退出此模式) 底行模式:保存文件、退出vi编辑器 (输入:号,后面紧跟w fname--指定文件名保存 wq--保存退出 q!--不保存退出)
如何在windows系统下远程控制xfce桌面
发表评论