>

Linux下安装mysql

- 编辑:乐百家599手机首页 -

Linux下安装mysql

linux安装mysql提醒conflicts with file from package的消除办法

rpm安装mysql时候的出现的一些主题材料

Linux下安装mysql

一、简易安装
#yum install -y mysql-server mysql mysql-devel
假如报安装包抵触:
file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-server-5.5.18-1.rhel5.i386 conflicts with file from package mysql-libs-5.0.46-1.rhel5.i386
把安装包卸载就足以了
#yum -y remove mysql-libs-5.0.46-1.rhel5.i386 -y的情致就是绝不询问是还是不是remove
卸载之后,再安装MySQL成功

二、手动安装
1、先上传安装包
/opt/MySQL-server-4.0.16-0.i386.rpm /opt/MySQL-client-4.0.16-0.i386.rpm(视景况而定,不必然要装)
2、给文件增添实施权限
#cd /opt/ 切换成制定目录
#chmod a x MySQL-server-4.0.16-0.i386.rpm 给文件增添施行权限
3、实施安装
#rpm -ivh MySQL-server-4.0.16-0.i386.rpm
假若设置进程报如下错误: file /usr/share/mysql/charsets/cp1251.xml from install of MySQL-server-5.5.24-1.el6.i686 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686 file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.5.24-1.el6.i686 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
缘由由包争辨引起的!操作系统自带的一些包与mysql的包争执,先移除争持的libs包,在拓展设置
#yum -y remove mysql-libs-5.1.52* -y的情致便是不用询问是或不是remove
error: Failed dependencies: libc.so.6 is needed by MySQL-server-community-5.1.63-1.rhel4.i386 libc.so.6(GLIBC_2.0) is needed by MySQL-server-community-5.1.63-1.rhel4.i386 libc.so.6(GLIBC_2.1) is needed by MySQL-server-community-5.1.63-1.rhel4.i386
#yum install libc.so.6
卸载完毕现在,再度推行安装MySQL
#rpm -ivh MySQL-server-4.0.16-0.i386.rpm

三、设置root密码 新装置的mysql,暗许用户root未有密码,必要安装密码
#/usr/bin/mysqladmin -u root -p '123456'
例如报错,展现未有权力连接 mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)'
消除措施:
先关闭数据库 #service mysqld stop
再以不检查安全的方法运营 # mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
再登录 #mysql -u root mysql
再改密码 # UPDATE user SET Password=PASSWORD('newpassword') where USER='root' and host='root' or host='localhost'; #FLUSH PRIVILEGES;
重启mysql #service mysqld restart 或者 #ps –aux | grep mysqld命令寻找mysql的历程号 然后进行kill -9 进度号杀掉mysql进度

四、授权远程用户登入 新装置的mysql,暗中同意只有本机才具登入,其余Computer通过网络签到须求授权
先登陆 #/usr/bin/mysql -uroot -p
再授权 #grant all on *.* to [email protected]'%' identified by '123456'; #flush privileges;
好了,至此,mysql基本上能够行使了。

一、简易安装 #yum install -y mysql-server mysql mysql-devel 假若报安装包抵触: file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-s...

Linux下安装mysql

一、简易安装
#yum install -y mysql-server mysql mysql-devel
借使报安装包抵触:
file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-server-5.5.18-1.rhel5.i386 conflicts with file from package mysql-libs-5.0.46-1.rhel5.i386
把安装包卸载就可以了
#yum -y remove mysql-libs-5.0.46-1.rhel5.i386 -y的乐趣正是不用询问是或不是remove
卸载之后,再设置MySQL成功

二、手动安装
1、先上传安装包
/opt/MySQL-server-4.0.16-0.i386.rpm /opt/MySQL-client-4.0.16-0.i386.rpm(视景况而定,不必然要装)
2、给文件扩展实行权限
#cd /opt/ 切换成制定目录
#chmod a x MySQL-server-4.0.16-0.i386.rpm 给文件增添施行权限
3、实施安装
#rpm -ivh MySQL-server-4.0.16-0.i386.rpm
如果设置进度报如下错误: file /usr/share/mysql/charsets/cp1251.xml from install of MySQL-server-5.5.24-1.el6.i686 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686 file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.5.24-1.el6.i686 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.i686
原因由包争辩引起的!操作系统自带的一点包与mysql的包争执,先移除争辩的libs包,在拓展安装
#yum -y remove mysql-libs-5.1.52* -y的乐趣正是毫不询问是不是remove
卸载实现之后,假若报如下错误:
error: Failed dependencies: libc.so.6 is needed by MySQL-server-community-5.1.63-1.rhel4.i386 libc.so.6(GLIBC_2.0) is needed by MySQL-server-community-5.1.63-1.rhel4.i386 libc.so.6(GLIBC_2.1) is needed by MySQL-server-community-5.1.63-1.rhel4.i386
贫乏相关包引起的,安装相关包就足以了,如下:
#yum install libc.so.6
再也施行安装MySQL:

#rpm -ivh MySQL-server-4.0.16-0.i386.rpm

三、设置root密码 新安装的mysql,默许用户root没有密码,需求设置密码
#/usr/bin/mysqladmin -u root -p '123456'
假若报错,呈现未有权力连接 mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)'
缓和格局:
先关闭数据库 #service mysqld stop
再以不检讨安全的主意运维 # mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
再登录 #mysql -u root mysql
再改密码 # UPDATE user SET Password=PASSWORD('newpassword') where USER='root' and host='root' or host='localhost'; #FLUSH PRIVILEGES;
重启mysql #service mysqld restart 或者 #ps –aux | grep mysqld命令寻觅mysql的历程号 然后试行kill -9 进度号杀掉mysql进程

四、授权远程用户登入 新装置的mysql,默许唯有本机本领登入,其余Computer通过网络签到须要授权
先登陆 #/usr/bin/mysql -uroot -p
再授权 #grant all on *.* to [email protected]'%' identified by '123456'; #flush privileges;
好了,至此,mysql基本上能够动用了。

五、坑爹的作业
有三回在一台机子上装MYSQL,装好后整个都寻常,能够在服务器上用命令行登入,但是纵然从未mysql这几个库,试过各样办法,重装数次,均不成功。有时的化解方案是,去别的常规的数据库中导一份mysql库过来,手动创造,能够健康使用,观察过三个月,未有其他难点。目前还不领悟为啥mysql这么些库没建起来

一、简易安装 #yum install -y mysql-server mysql mysql-devel 假如报安装包争执: file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-s...

 

 

在linux上边设置 mysql的时候出现了错误:

今天在测试服务器上安装mysql服务时,下载完mysql安装包后 rpm -ivh MySQL-server-5.6.10-1.el6.x86_64.rpm 后报错如下: 

[[email protected] local]# rpm -ivh MySQL-server-5.5.24-1.el6.i686.rpm 

  www.2cto.com  

Shell代码    www.2cto.com  

Preparing... ########################################### [100%] file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.6.10-1.el6.x8664 conflicts with file from package mysql-libs-5.1.61-4.el6.x8664

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

 

        file /usr/share/mysql/charsets/cp1251.xml from install of
MySQL-server-5.5.24-1.el6.i686 conflicts with file from package
mysql-libs-5.1.52-1.el6_0.1.i686  

file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-5.6.10-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64

        file /usr/share/mysql/czech/errmsg.sys from install of
MySQL-server-5.5.24-1.el6.i686 conflicts with file from package
mysql-libs-5.1.52-1.el6_0.1.i686  

 

        file /usr/share/mysql/danish/errmsg.sys from install of
MySQL-server-5.5.24-1.el6.i686 conflicts with file from package
mysql-libs-5.1.52-1.el6_0.1.i686  

file /usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-5.6.10-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64

        file /usr/share/mysql/dutch/errmsg.sys from install of
MySQL-server-5.5.24-1.el6.i686 conflicts with file from package
mysql-libs-5.1.52-1.el6_0.1.i686  

 

        file /usr/share/mysql/english/errmsg.sys from install of
MySQL-server-5.5.24-1.el6.i686 conflicts with file from package
mysql-libs-5.1.52-1.el6_0.1.i686  

file /usr/share/mysql/english/errmsg.sys from install of MySQL-server-5.6.10-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64

        file /usr/share/mysql/estonian/errmsg.sys from install of
MySQL-server-5.5.24-1.el6.i686 conflicts with file from package
mysql-libs-5.1.52-1.el6_0.1.i686  

 

        file /usr/share/mysql/french/errmsg.sys from install of
MySQL-server-5.5.24-1.el6.i686 conflicts with file from package
mysql-libs-5.1.52-1.el6_0.1.i686  

file /usr/share/mysql/estonian/errmsg.sys from install of MySQL-server-5.6.10-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64

        file /usr/share/mysql/german/errmsg.sys from install of
MySQL-server-5.5.24-1.el6.i686 conflicts with file from package
mysql-libs-5.1.52-1.el6_0.1.i686  

 

本文由乐百家数据库发布,转载请注明来源:Linux下安装mysql