Update/Install mysql-client to version 5.7 using yum - mysql

I was writing my own chef recipe to install only the mysql client version 5.7 and not the server. I was trying to do this using yum and had written my own chef recipe, but it by default adds the version 5.5 instead of 5.7 and I am not able to update only the client to 5.7 using yum so that I could write my own recipe on chef.
When I give the version field in my recipe, it throws an error.

As with all things in Chef, it only does what you tell it. If there isn't a MySQL 5.7 package available in your configured yum repos, the package resource will error. We offer a yum_repository resource if you want to configure a new package source with newer versions, or you could use an rpm_package resource to install a single package directly if you make one yourself.

Related

How to fix a broken MySQL installation?

Installing a PHP application that requires MySQL or MariaDB, I first installed MariaDB via 'apt install' from the MariaDB repos, but there were behaviours with the installation of the application that seemed to be caused by some kind of incompatibility. Calls to the DB were timing out, and although I could see it was creating the DB, it was impossible to set the application up in its setup routine.
So I used apt remove to get rid of MariaDB. I saw the application had a *.deb installer for all requirements (wish I'd seen this sooner!) and, after removing PHP and Nginx, I attempted to install it the normal way. Unfortunately, the MySQL portion of the installation failed with:
Automatic maintenance of MySQL Server daemon disabled.
Packaging maintainer scripts detected a case that it does not know how to handle and cannot continue configuring MySQL. Automatic management of your MySQL Installation has been disabled to allow other packaging tasks to complete. For more details, see /etc/mysql/FROZEN
Unfortunately, /etc/mysql/FROZEN is a symlink to a non-existent file explaining downgrading. I can't run the uninstaller of the overall package or repair the installation with sudo --fix-broken install because the installer requires a MySQL password I can't provide it.
How can I fix my borked MySQL installation? If I could just get to a place to have MySQL run properly, understanding what left-overs perhaps from the MariaDB installation that I need to delete manually before trying to repair it, that would be helpful. FYI, the version of MariaDB was 10.3, and the version of MySQL the application package was installing was 5.7.
Any suggestions appreciated.

sql.h not found in Linux

I'm trying to migrate a PostgreSQL db to MySQL using Workbench and I need the PostgreSQL drivers to make the connection.
I'm following this post for installing the drivers and I'm having some issues while runing the make command:
./psqlodbc.h:41:10: fatal error: 'sql.h' file not found
I've read here that I need to install unixodbc-dev but then I have to uninstall libiodbc2-dev which then make reports missing iodbcinst.h file!
Is there a package where both headers are present? How can I install sql.h manually in the system?
BTW: I'm using Linux Mint.

How do I update MySQL installed with Homebrew on a Mac

I've installed MySQL on a Mac via brew.
I do constant brew updates but MySQL keeps telling me it has a new version.
Does brew update not update MySQL?
If so then how should I do it? Manually?
No, brew update only updates Homebrew itself including retrieving the latest list of formulas/packages available.
Once you have ran brew update you can then upgrade all formulas/packages using:
brew upgrade
To upgrade a particular package you can use the brew upgrade command like:
brew upgrade mysql
Before running an upgrade you may want to know what can be or is going to be upgraded using the command:
brew outdated
NOTE always remember to read the post install/upgrade notes that are output. Some packages require manual steps post install/upgrade like major database version upgrades often require data upgrade/migration procedures to be run.

Can I safely remove mariadb from Centos Linux?

I just did a clean install of CentOS Linux. The first thing I did after installing CentOS was to download MySQL and try to install the -server rpm file. But the installation fails with a lot of messages stating conflicts with MariaDB packages which seem to be redundant to those in MySQL. I want to use MySQL as my database.
Are there any reasons why I should not just delete mariadb, so that the conflicts can be resolved? If mariadb performs some important functions in CentOS, I do not want to end up having my system crash.
You could use MariaDB as mysql version 5.5 for it is just another MYSQL branch...
In Centos 7, it is a alternative project of oracle mysql. It contains all mysql functions and optimize structures, data processing, Algorithm etc..
you could even login the server with a "mysql" command.
you don't need to pay attentions on the name, it is no problem to your former mysql projects.
ps:
I don't think that a linux system will have a "clean", "pure" os environment. Linux is a free and open source system which means you could install and remove every thing with no problem.
To have MySQL database functionality you can install either the MySQL packages or the MariaDB packages. MariaDB is a fork originating from the same MySQL code base. For compatibility see https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/
Yes, you can remove MariaDB packages and replace them by MySQL packages.

Upgrading mysql from 4.1.22 to 5.0

I'm trying to upgrade our company's 4.1.22 version of MySQL to 5.
I'm using
sudo yum --enablerepo=centosplus upgrade mysql*
but keep getting an error of conflicted files with the 4.1 version.
Does that mean there really isn't any other way than uninstalling 4.1 and installing 5.0? I have read that using the yum upgrade command should work however...
Thanks in advance!
You need to uninstall MySQL 4.1.22 and fresh install MySQL 5. We recently migrated from MySQL 5.0 to 5.5 which required similar steps.