Can we install MySQL different versions on Linux CentOS5.8? - mysql

I am trying to install a software which required MySQL-server, MySQL-client installed on the server so now I want to install MySQL-server and MySQL-client using rpm files "MySQL-server-5.5.17-1.rhel5.x86_64.rpm" and "MySQL-client-5.5.17-1.rhel5.x86_64.rpm".
I have installed MySQL-client but when I try to run mysql-server
*rpm -i MySQL-server-5.5.17-1.rhel5.x86_64.rpm*
it's showing error:
*error: Failed dependencies:
MySQL conflict with mysql-5.0.77-4.el5_6.6.x86_64
MySQL conflict with mysql-5.0.77-4.el5_6.6.i386
MySQL conflict with mysql-server-5.0.77-4.el5_6.6.x86_64*
So how can i solve this problem?

the error given by you *error: Failed dependencies:
MySQL conflict with mysql-5.0.77-4.el5_6.6.x86_64
MySQL conflict with mysql-5.0.77-4.el5_6.6.i386
MySQL conflict with mysql-server-5.0.77-4.el5_6.6.x86_64*
It clear show that the machine you are going to install mysql 5.5 rpm have mysql 5.0.77 installed .
to resolve this problem .
1. you take backup of datadir and my.cnf (if you are using mysql 5.0 db server earlier).
2. remove all mysql 5.0 server packages , to remove these package you should knew what are the packages already installed on machine
to view all mysql package already installed use rpm -qa | grep -i "mysql*" this command show what package is already installed on machine
now you have to remove all package which name shows in above command.
to remove a package/rpm use rpm -e mysql-5.0.** if show error then use
rpm -e --nodeps mysql-5.0.**
we have to remove all packages one by one by using rpm -e .
after successful remove all older version of mysql , now start installation of mysql-5.5*** packages by using rpm -ivh mysql-5.5***.rpm.

First question - is the version of MySQL already installed actually in use or was it simply there as a result of a fresh CentOS install? If the former, try upgrading rather than installing. If the latter, uninstall the old version (possibly using the --no-deps option on rpm) and then install the newer version
Next, are you trying to replace MySQL or install another version alongside it?
If the former, again try upgrading rather than installing. If that's not possible, you're going to have to remove the older version and then install the new version
If the latter, and if it is possible, look at the --prefix and --relocate options in RPM.as they may help.
If you do to mange to get it installed side by side with an older, you'll have fun and games ensuring that the relevant versions are pointing to the correct libraries and that you don't get any corruption between them. Also, you will need to run them so that they listen on separate ports with separate database folders, PID and socket files etc.
Whatever you need to do, do it out of business hours with as many backups as you can do

Related

Can't use npm_modules after installation

I'm starting a project where im going to use AngularJS, NodeJS and MySQL. This is my first real web application, and it's also the first time im using npm.
I've installed Node from their official website, and when i write npm install the node_modules comes to the project directory.
The problem occurs if I try to use any of the installed npm_modules. I tried to download mysql, and the installation worked, but when i type mysql -p i get: "bash: mysql: command not found"
I've also tried to install it with npm install mysql -g, but it still doesn't work.
If it means anything my $PATH is /usr/local/git/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/local/bin
The mysql npm package contains just the nodejs client library for mysql. You need to install the mysql server separately using the appropriate method for your OS.
it looks like you have not installed mysql on your system.
install mysql server using the following command
sudo apt-get install mysql-server

Why can't I uninstall mysql-5.5 & install mysql-5.6 on Amazon Linux machine?

I'm on a 64-bit Amazon Linux machine.
I had previously installed mysql-server 5.5. (using sudo yum install)
However, I soon found out that my application requires MySql-serve 5.6.
So I uninstalled mysql-server 5.5. (using sudo yum remove mysql-server) and now I'm following these instruction to install mysql-server 5.6.
But I'm running into a problem.
when I try to do the second install, I get the following 2 errors:
file /usr/lib64/mysql/libmysqlclient.so.18 from install of mysql-community-libs-5.6.14-3.el6.x86_64 conflicts with file from package mysql55-libs-5.5.46-1.10.amzn1.x86_64
file /etc/my.cnf from install of mysql-community-server-5.6.14-3.el6.x86_64 conflicts with file from package mysql-config-5.5.46-1.10.amzn1.x86_64
Why on earth am I getting these two errors? How do I fix them?
I removed mysql-server-5.5, so why is it conflicting with 5.6?
I did ls on /etc/my.cnf and /usr/lib64/mysql/libmysqlclient.so.18 and the files don't even exist!! If the files don't exist how can they be conflicting with other files?? Who can help explain this?
PS, I tried #msknapp's explanation here: Can't install MySQL 5.6 by RPM, however I don't know what to do after step #1 to install the rpm. I think that step is left unstated.
mysql-server (of whatever version) depends on other packages ( in your case mysql-community-libs mysql-community-server)
When it is installed in the first place with the old version this stuff is installed. When you "uninstall" mysql-server these dependencies are NOT removed.
When you try and install the new version these still existing packages will conflict with the new package. It does not matter if the actual files in the package are there, it is the package and it's listing of what to expect that conflicts.
To resolve your problem figure out what the dependencies of mysql-server were and uninstall them before attemping the install.
This answer https://superuser.com/questions/294662/how-to-get-list-of-dependencies-of-non-installed-rpm-package may be of interest for working out what mysql-server depends on

I'm trying to install MySQL 5.5 onto a CentOS 6.7 server

I'm trying to install MySQL 5.5 onto a CentOS 6.7 server but I keep getting an error message similar to the one below for about 25 different conflicts all for mariadb-galera or mariadb-galera-server:
file /usr/bin/mysql from install of mariadb-galera-5.5.39-18.el6.art.x86_64
conflicts with file from package MySQL55-client-5.5.46-1.cp1148.x86_64
Any ideas on how I can overcome this?
Thanks in advance.
Looks like you already have MariaDB installed. First of all remove MariaDB:
yum remove mariadb*
Check the MariaDB repo in /etc/yum.repos.d. It should be called MariaDB.repo or something like that. If the file exists either remove it or edit it and disable the repo (set enabled=0).
I guess (based on your errors) that you already have a repository that contains MySQL 5.5. If not, install Remi repo. See a link here: https://gist.github.com/jhjguxin/145f3d4c0dafcfb7246b
Finally, you shoul be able to install MySQL 5.5.

mysql 5.5 on centos 6.4

I have a requirement for MySQL 5.5, and the box is a CentOS 6.4 64-bit VM.
MySQL 5.1.69 is installed, and won't let me install any of the RPMs from the 5.5 RPMs..
MySQL-client-5.5.32-1.el6.x86_64.rpm
MySQL-devel-5.5.32-1.el6.x86_64.rpm
MySQL-embedded-5.5.32-1.el6.x86_64.rpm
MySQL-server-5.5.32-1.el6.x86_64.rpm
MySQL-shared-5.5.32-1.el6.x86_64.rpm
MySQL-shared-compat-5.5.32-1.el6.x86_64.rpm
MySQL-test-5.5.32-1.el6.x86_64.rpm
So I run yum -y remove mysql and then try to install the newer version. I first of all run
rpm -ivh MySQL-shared-5.5.32-1.el6.x86_64.rpm
rpm -ivh MySQL-shared-compat-5.5.32-1.el6.x86_64.rpm
So far so good. I then try to install the server.
rpm -ivh MySQL-server-5.5.32-1.el6.x86_64.rpm
And I get this..
file /usr/share/mysql/romanian/errmsg.sys from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.69-1.el6_4.x86_64
... and so on. If I google some of those errors, I get this page from StackOverflow..
Installing mysql-libs on server with MySQL-Server5.5
.. but if I look at the advice, it says to install the MySQL-shared-compat-5.5.32-2.el6.x86_64.rpm. But it's already installed. :(
Any advice would be welcome. Thank you.
One way is to install all the RPMs at the same time with yum install MySQL*.rpm, which ideally should take care of all package dependencies and upgrades.
You can also get around this problem by using the --replacefiles option to RPM:
rpm -ivh --replacefiles MySQL-server-5.5.32-1.el6.x86_64.rpm
That uses the error message language files from the server package to overwrite those in the 5.1 version that comes with CentOS.
Had this issue with webtatic repository.
Using remi, epel and rpmforge repository saved me the trouble.
Here is the link I referred :
Cent OS 6.4, Php 5.4, Mysql 5.5 - HowTo

Best way to install MySQL 5.6 on Centos 6.4

I just installed Centos 6.4, and installed MySQL using the version that came with the Centos distribution. To my dismay, it is MySQL 5.1.69 versus the current 5.6.12. As stated on http://dev.mysql.com/doc/refman/5.5/en/linux-installation-native.html, "the MySQL version will often be some way behind the currently available release", but I didn't expect that long.
[root#centosBox ~]# rpm -qa | grep mysql
mysql-5.1.69-1.el6_4.x86_64
mysql-devel-5.1.69-1.el6_4.x86_64
mysql-server-5.1.69-1.el6_4.x86_64
mysql-libs-5.1.69-1.el6_4.x86_64
[root#centosBox ~]# whereis mysql
mysql: /usr/bin/mysql /usr/lib64/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
[root#centosBox ~]#
An alternative is to install by RPM packages which is the "recommended way to install MySQL" per http://dev.mysql.com/doc/refman/5.5/en/linux-installation-rpm.html. I have done so and it wasn't overly complicated, however, I am concerned as I've often been told that I should always install by yum when available. Towards the very end of the documentation, it does describe doing so extremely briefly using yum, however, it is so brief that I question whether it is the way to go.
So.... What is the best way for a not guru Linux user to install/upgrade MySQL on a Centos machine?
Just this week (2013-10-28), MySQL announced official yum repositories for MySQL Community Edition. The packages are intended for use with RHEL-compatible Linux (e.g. CentOS).
All the details including how to set up the yum repo on your system, can be found from the announcement:
http://insidemysql.com/announcing-new-yum-repositories-for-mysql/
A bit off-topic but there we go.
It is recommended to install from the repositories because you can later update your software to a newer version with a simple yum upgrade. The repository takes care of that for you, as well as any dependencies the software may entertain with other libraries.
RPM Packages installed manually (even with yum, which then only acts as an installer) will have to be managed manually as well.
Since the MySQL RPM package shows no dependencies (as far as I can tell from the manual), you are safe from this side.
And to answer your question: the best method is to stick with the versions from the repository. If you need a newer version, then you took the right path.
I am no guru myself but I was happy with the result of the RPM method you mentioned since other times I have seen problems with mysql-libs being a dependency for other packages.
(depending on the 5.6 version you want and cpu)
mkdir MySQL
cd MySQL
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-5.6.16-1.el6.x86_64.rpm-bundle.tar
tar -xvf MySQL-5.6.16-1.el6.x86_64.rpm-bundle.tar
yum install MySQL*rpm
installs them in the correct order and removes mysql-libs in one step without conflicts.
http://dev.mysql.com/doc/refman/5.6/en/linux-installation-rpm.html
It doesn't surprise me that MySQL is a bit behind. Why would Oracle make it easy for you to not use pay-for Oracle? </rant>
Anyway, you can get the awkwardly named, but otherwise identical MariaDB to run easily by adding a new YUM repository.
You can install MySQL 5.5 (mysql55-server.x86_64) from IUS repository (currently version 5.5.34 available)