missing mysql_config error while installing DBD::mysql - mysql

I saw Trying to install Perl-Mysql DBD, mysql_config can't be found, and tried to locate mysql_config, but didn't find it. So, I tried to install mysql-devel, and then I get this error-
[nbezzala#stats /]$ sudo yum install mysql-devel
[sudo] password for nbezzala:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.cmich.edu
* extras: holmes.umflint.edu
* updates: mirror.symnds.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql-devel.i386 0:5.0.77-4.el5_6.6 set to be updated
--> Processing Dependency: libmysqlclient.so.15 for package: mysql-devel
--> Processing Dependency: libmysqlclient_r.so.15 for package: mysql-devel
---> Package mysql-devel.x86_64 0:5.0.77-4.el5_6.6 set to be updated
--> Running transaction check
---> Package mysql.i386 0:5.0.77-4.el5_6.6 set to be updated
--> Processing Conflict: mysql conflicts MySQL
--> Finished Dependency Resolution
mysql-5.0.77-4.el5_6.6.i386 from base has depsolving problems
--> mysql conflicts with MySQL-server
Error: mysql conflicts with MySQL-server
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.
[nbezzala#stats /]$

I had the same problem and had to install libmysqlclient-dev on my Debian linux.
That mysql_config file was in that package.

mysql v 5.5.17 was installed on the machine, and I was trying to install 5.0.77 components via yum. Thanks Alexandr.

Related

How can I completely remove MySQL 8 from Redhat Linux so I can install MySQL 5?

I am trying to install MySQL 5 on a machine where there was a previous (unsuccessful) attempt to install MySQL 8.
I installed the repo for MySQL 5:
yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
I then ran:
yum install mysql-community-server
I get:
Error: Package: mysql-community-server-5.7.28-1.el7.x86_64 (mysql57-community)
Requires: mysql-community-common(x86-64) = 5.7.28-1.el7
Installed: mysql-community-common-8.0.18-1.el7.x86_64 (#mysql80-community)
mysql-community-common(x86-64) = 8.0.18-1.el7
How to fix this?
If I run...
yum remove mysql mysql-server
I get...
No Match for argument: mysql
No Match for argument: mysql-server
No Packages marked for removal
I needed to remove the old repo, like so...
yum remove mysql-community-common-8.0.18-1.el7.x86_64

how to uninstall maridb and install remysql in centos 7 , linux?

I have installed maria db in my centos 7 , But now after uninstalling the maridb with:
yum remove MariaDB-server MariaDB-client
when I install the mysql-devel or mysql or mysql-server it always install maridb.
How can I move back to mysql?
I have also removed the mariadb respository from the list of repositories at:/etc/yum.repos.d
On:
yum install mysql mysql-server mysql-devel
Error log on the cmd:
[root#ONS88 ~]# yum install mysql mysql-server mysql-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.s.uw.edu
* epel: fedora.mirrors.pair.com
* extras: centos.s.uw.edu
* ius: mirror.its.dal.ca
* nux-dextop: mirror.li.nux.ro
* updates: centos.s.uw.edu
Resolving Dependencies
--> Running transaction check
---> Package mariadb101u.x86_64 1:10.1.29-1.ius.centos7 will be installed
--> Processing Dependency: mariadb101u-common(x86-64) = 1:10.1.29-1.ius.centos7 for package: 1:mariadb101u-10.1.29-1.ius.centos7.x86_64
--> Processing Dependency: mariadb101u-libs(x86-64) = 1:10.1.29-1.ius.centos7 for package: 1:mariadb101u-10.1.29-1.ius.centos7.x86_64
---> Package mariadb101u-devel.x86_64 1:10.1.29-1.ius.centos7 will be installed
---> Package mysql-community-server.x86_64 0:5.6.38-2.el7 will be installed
--> Processing Dependency: mysql-community-common(x86-64) = 5.6.38-2.el7 for package: mysql-community-server-5.6.38-2.el7.x86_64
--> Processing Dependency: mysql-community-client(x86-64) >= 5.6.10 for package: mysql-community-server-5.6.38-2.el7.x86_64
--> Running transaction check
---> Package mariadb101u-common.x86_64 1:10.1.29-1.ius.centos7 will be installed
--> Processing Dependency: mariadb101u-config(x86-64) = 1:10.1.29-1.ius.centos7 for package: 1:mariadb101u-common-10.1.29-1.ius.centos7.x86_64
---> Package mariadb101u-libs.x86_64 1:10.1.29-1.ius.centos7 will be installed
---> Package mysql-community-client.x86_64 0:5.6.38-2.el7 will be installed
--> Processing Dependency: mysql-community-libs(x86-64) >= 5.6.10 for package: mysql-community-client-5.6.38-2.el7.x86_64
---> Package mysql-community-common.x86_64 0:5.6.38-2.el7 will be installed
--> Running transaction check
---> Package mariadb101u-config.x86_64 1:10.1.29-1.ius.centos7 will be installed
---> Package mysql-community-libs.x86_64 0:5.6.38-2.el7 will be installed
--> Processing Conflict: 1:mariadb101u-libs-10.1.29-1.ius.centos7.x86_64 conflicts mysql-community-libs
--> Processing Conflict: 1:mariadb101u-10.1.29-1.ius.centos7.x86_64 conflicts mysql-community-client
--> Processing Conflict: 1:mariadb101u-config-10.1.29-1.ius.centos7.x86_64 conflicts mysql-community-server
--> Processing Conflict: 1:mariadb101u-common-10.1.29-1.ius.centos7.x86_64 conflicts mysql-community-common
--> Finished Dependency Resolution
Error: mariadb101u-libs conflicts with mysql-community-libs-5.6.38-2.el7.x86_64
Error: mariadb101u conflicts with mysql-community-client-5.6.38-2.el7.x86_64
Error: mariadb101u-config conflicts with mysql-community-server-5.6.38-2.el7.x86_64
Error: mariadb101u-common conflicts with mysql-community-common-5.6.38-2.el7.x86_64
You could try using --skip-broken to work around the problem
** Found 115 pre-existing rpmdb problem(s), 'yum check' output follows:
ModemManager-1.6.0-2.el7.x86_64 is a duplicate with ModemManager-1.1.0-8.git20130913.el7.x86_64
ModemManager-glib-1.6.0-2.el7.x86_64 is a duplicate with ModemManager-glib-1.1.0-8.git20130913.el7.x86_64
adcli-0.8.1-3.el7.x86_64 is a duplicate with adcli-0.7.5-4.el7.x86_64
alsa-tools-firmware-1.1.0-1.el7.x86_64 is a duplicate with alsa-tools-firmware-1.0.28-2.el7.x86_64
at-3.1.13-22.el7.x86_64 is a duplicate with at-3.1.13-20.el7.x86_64
avahi-0.6.31-17.el7.x86_64 is a duplicate with avahi-0.6.31-15.el7.x86_64
avahi-autoipd-0.6.31-15.el7.x86_64 has installed conflicts avahi > ('0', '0.6.31', '15.el7'): avahi-0.6.31-17.el7.x86_64
avahi-autoipd-0.6.31-17.el7.x86_64 has installed conflicts avahi < ('0', '0.6.31', '17.el7'): avahi-0.6.31-15.el7.x86_64
$ sudo yum install http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
$ sudo yum repolist enabled | grep "mysql.*-community.*"
$ sudo systemctl start mysqld
$ sudo systemctl status mysqld
Login in to mysql
$ mysql -u root
Mysql auto-start on boot
$ sudo systemctl enable mysqld.service
link to the complete answer https://dbahire.com/how-to-install-mysql-5-6-on-centos-7/
To set the password while using mysql
mysql_secure_installation

In CentOS7, can not start MySQL

I want use MySQL on CentOS7.
installed MySQL package using yum.
[root#node01 ~]# yum install mysql mysql-*
then,
[root#node01 ~]# systemctl start mysqld.service
Failed to issue method call: Unit mysqld.service failed to load: No such file or directory.
i can not execute MySQL. How can i solve this problem?
when you run
yum install mysql
command by default it installs mariadb not mysql. so try this following command
yum list installed | grep mariadb
if mariadb-server is missing try this following command
yum install mariadb-server
it installs the server package then start the service
systemctl start mariadb
or
service mariadb start
My issue is solved in this way.
Thanks
To check for the required packages, type the given command:
$ rpm -qa | grep mariadb
Output:
mariadb-libs-5.5.44-2.el7.centos.x86_64
mariadb-5.5.44-2.el7.centos.x86_64
mariadb-devel-5.5.44-2.el7.centos.x86_64
mariadb-server-5.5.44-2.el7.centos.x86_64
If the last package is absent, type the given commands:
$ sudo yum -y install mariadb-server
$ sudo systemctl start mariadb
$ cat /etc/redhat-release
Output:
CentOS Linux release 7.2.1511 (Core)
Check /etc/init.d/ for your mysql service name and then
service mysql_service_name start
On centos it is either:
service mysqld start
or for MariaDB:
service mariadb start
mysql-community-common appears to be installed along with Red Hat-based *nix v7 installs and it in turn conflicts with mariadb installation. I'm using Oracle Linux 7, just ran into this. After a fresh install of OL7, mysql-community-common and mysql-community-libs are installed. Remove mysql-community-common THEN install mariadb and everything works like a champ.
root#ol7-101:~> yum list installed | grep mysql
mysql-community-common.x86_64 5.6.27-2.el7 #Server-Mysql/7.2
mysql-community-libs.x86_64 5.6.27-2.el7 #Server-Mysql/7.2
root#ol7-101:~>
root#ol7-101:~> yum install mariadb-server mariadb -y
Loaded plugins: ulninfo
Resolving Dependencies
--> Running transaction check
[...]
86_64 conflicts with file from package mysql-community-common-5.6.27-2.el7.x86_64
file /usr/share/mysql/spanish/errmsg.sys from install of MariaDB-server-10.1.11-1.el7.centos.x86_64 conflicts with file from package mysql-community-common-5.6.27-2.el7.x86_64
file /usr/share/mysql/swedish/errmsg.sys from install of MariaDB-server-10.1.11-1.el7.centos.x86_64 conflicts with file from package mysql-community-common-5.6.27-2.el7.x86_64
file /usr/share/mysql/ukrainian/errmsg.sys from install of MariaDB-server-10.1.11-1.el7.centos.x86_64 conflicts with file from package mysql-community-common-5.6.27-2.el7.x86_64
file /usr/share/mysql/errmsg-utf8.txt from install of MariaDB-server-10.1.11-1.el7.centos.x86_64 conflicts with file from package mysql-community-common-5.6.27-2.el7.x86_64
Error Summary
-------------
root#ol7-101:~> systemctl start mariadb
Failed to start mariadb.service: Unit mariadb.service failed to load: No such file or directory.
root#ol7-101:~> systemctl enable mariadb.service
Failed to execute operation: Access denied
root#ol7-101:~>
root#ol7-101:~> yum erase mysql-community-common.x86_64
Loaded plugins: ulninfo
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-common.x86_64 0:5.6.27-2.el7 will be erased
--> Finished Dependency Resolution
[...]
root#ol7-101:~> yum install mariadb mariadb-libs mariadb-server -y
Loaded plugins: ulninfo
Resolving Dependencies
--> Running transaction check
[...]
Complete!
root#ol7-101:~> systemctl start mariadb.service
root#ol7-101:~>
root#ol7-101:~> systemctl enable mariadb.service
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
root#ol7-101:~>
CentOS7 use mariaDB replaced Mysql, you can use mariaDB as same as Mysql. Or you can download repo from mysql.com. And then you can install mysql

Processing dependency error when installing MySQL 5.6 on CentOS 6.5

I followed an article here https://www.digitalocean.com/community/tutorials/how-to-install-mysql-5-6-from-official-yum-repositories to install MySQL 5.6 on CentOS.
But when I run:
sudo yum install mysql-community-server
I see following errors:
Error: Package: mysql-community-server-5.6.20-4.el7.x86_64 (mysql56-community)
Requires: systemd
Error: Package: mysql-community-server-5.6.20-4.el7.x86_64 (mysql56-community)
Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
In fact, no matter how I execute yum install mysql mysql-server, I'll get the same errors. I searched online, but lack of resources mentioned what's wrong with 'systemd' and 'libstdc++.so.6' and how to solve this issue.
Before:
yum install openssh-server wget
yum -y update
List your repos and delete mysql-community...
yum repolist
Install nessary repos:
rpm -ihv http://mirror.yandex.ru/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ihv http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum install yum-priorities
Add priority=10 in this files:
vi /etc/yum.repos.d/epel.repo
vi /etc/yum.repos.d/nginx.repo
vi /etc/yum.repos.d/remi.repo
And from new repos installation will be good:
yum install mysql mysql-server
After may be doing this:
chkconfig --levels 235 mysqld on
service mysqld start
/usr/bin/mysql_secure_installation
for each of the libraries you cannot find, simply do a 'yum provides' for it, then install the package
e.g.
yum provides systemd
yum provides libstdc++.so.6
then you would do yum install systemd libstdc++ you may need to do a yum install libstdc++-<version> depending on your search results.

Problems Installing perl-DBD-MySQL

I'm having dependency problems installing perl-DBD-MySQL.
Server is running on Centos 6.4 and MySQL 5.5.31.
I ran this command
yum install perl-DBD-MySQL
Outputs:
Loaded plugins: fastestmirror, security Loading mirror speeds from
cached hostfile * base: mirror.nl.webzilla.com * extras:
mirror.nl.webzilla.com * updates: mirrors.supportex.net Setting up
Install Process Resolving Dependencies
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package:
perl-DBD-MySQL-4.013-3.el6.x86_64
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--> Finished Dependency Resolution Error: Package: perl-DBD-MySQL-4.013-3.el6.x86_64 (base)
Requires: libmysqlclient.so.16()(64bit) Error: Package: perl-DBD-MySQL-4.013-3.el6.x86_64 (base)
Requires: libmysqlclient.so.16(libmysqlclient_16)(64bit) You could try using --skip-broken to work around the problem You
could try running: rpm -Va --nofiles --nodigest
I noticed that I have libmysqlclient.so.18, and not libmysqlclient.so.16 on the server.
Any help is appreciated, thanks!
There's a conflict in the instaled modules on your system. Please make sure your system is up-to-date first. Use these commands:
yum upgrade -y
yum install perl-DBD-MySQL
You can fix your problem using the following command:
yum install perl-DBD-MySQL --enablerepo=*