Upgrade/Update from mariadb 5.5 to 10 - mysql

Recently MariaDB 10 became stable.
MySQL 5.6 features were added to 10 release. I need to use some new features, so I'm interested:
Has anybody upgraded from MariaDB 5.5 to 10 on production server?
What is the upgrade path (simply changing mariadb repo to 10 will work?)?
Is the transition smooth?

We have recently been through that exact upgrade, also on CentOS. We experienced no trouble at all with any of our databases, all using the InnoDB engine. I have enclosed our internal upgrade how-to, this may save you some time and show you which path we took.
This guide assumes you are running the AMD64 versjon og CentOS 6.
Create a yum repo file for MariaDB and name it /etc/yum.repos.d/MariaDB.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
// The signing key value is 0x1BB943DB.
Uninstall current MariaDB server and client. If yum was used to install them, use:
yum remove mysql MySQL-server MySQL-shared MySQL-shared-compat
This should uninstall all packages depending on MariaDB/MySQL, and consequently requires you to reinstall php-mysql as described below. Any other packages depending on MySQL will also have to be reinstalled, so keep an eye out for this.
Install MariaDB
yum install MariaDB-server MariaDB-client
Reinstall PHPs MySQL lib
yum install php-mysql
Start MariaDB, update data files and restart Apache
service mysql start
mysql_upgrade
service httpd restart
Consider rebooting to test that all works as desired.

Upgrade from version 5.5 to 10.0.12 was very smooth.
All user databases and local accounts were automatically restored after the upgrade..
+-----------------+
| ##version |
+-----------------+
| 10.0.12-MariaDB |
Note: You might need to restart the CentOS host if you notice a connection error:

If you configured your root access to MySQL/MariaDB with a password, you need to use the -p option when you want to use mysql_upgrade.

Related

Problems installing MySQL 5.7 properly on fresh CentOS 7 install

I admit that I am new to back-end work in general and I seem to be stuck (for several hours) following through with completing the setting up process for Magento 2.3
I was following https://devdocs.magento.com/guides/v2.3/install-gde/prereq/mysql.html for my commands but to no success.
I managed to get the following installed:
Cent OS 7 (x86_64)
Apache 2.4.6
PHP 7.2.14 (all the extensions installed passed the Setup Wizard readiness check)
I used these commands to install MySQL 5.7 Community Release: (from the documentation)
wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
yum -y install mysql mysql-server
yum -y install mysql-community-server
To check if my installation went well, when I run:
mysql --version
I received an error message saying:
-bash: /usr/bin/mysql: No such file or directory
I know that there is something I definitely am missing out completely. When I try to start the MySQL service using the command:
systemctl start mysqld
I get the resulting error message:
Failed to start mysqld.service: Unit not found.
Any suggestions will much be appreciated. Thank you in advance.
Maybe it installed it as mariadb?
systemctl start mariadb
After removing MySQL 5.7 community release from my Cent OS, I decided to install MariaDB.
Inside the directory /etc/yum.repos.d/ I've created a file called MariaDB.repo and added this into the file:
# MariaDB 10.3 CentOS repository list - created 2019-01-25 05:36 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
I then performed the command in my terminal window:
sudo yum install MariaDB-server MariaDB-client
Because of this, mysql --version and systemctl start mysql works like a charm. Thanks #greenberet123 and #danblack for the suggestion.

How can i remove instance of mysql from brew info mysql

I am trying to remove mysql from my macbook pro to start from fresh.
I have followed guides on how to remove all instances and files of mysql, however if i run
brew info mysql
I still get info pertaining to mysql 8.0 as follows:-
mysql: stable 8.0.12 (bottled)
Open source relational database management system
https://dev.mysql.com/doc/refman/8.0/en/
Conflicts with:
mariadb (because mysql, mariadb, and percona install the same
binaries.)
mariadb-connector-c (because both install plugins)
mysql-cluster (because mysql, mariadb, and percona install the same
binaries.)
mysql-connector-c (because both install MySQL client libraries)
percona-server (because mysql, mariadb, and percona install the same
binaries.)
Not installed
From: https://github.com/Homebrew/homebrew-
core/blob/master/Formula/mysql.rb
==> Dependencies
Build: cmake ✘
Required: openssl ✘
==> Requirements
Required: macOS >= 10.10 ✔
==> Options
--with-debug
Build with debug support
--with-embedded
Build the embedded server
--with-local-infile
Build with local infile loading support
--with-memcached
Build with InnoDB Memcached plugin
--with-test
Build with unit tests
==> Caveats
We've installed your MySQL database without a root password. To secure
it run:
mysql_secure_installation
MySQL is configured to only allow connections from localhost by default
To connect run:
mysql -uroot
To have launchd start mysql now and restart at login:
brew services start mysql
Or, if you don't want/need a background service you can just run:
mysql.server start
==> Analytics
install: 66,127 (30d), 215,889 (90d), 794,987 (365d)
install_on_request: 61,289 (30d), 185,026 (90d), 647,998 (365d)
build_error: 444 (30d)
How can i completely remove this? Thank you for any help!
mysql is already uninstalled. See these lines in the middle of your output:
Not installed
From: https://github.com/Homebrew/homebrew-
core/blob/master/Formula/mysql.rb
Homebrew is fetching this information on mysql's dependencies and usage remotely from GitHub. I do not have mysql installed either and get the same output when I run brew info mysql. If you try running mysql from the command line, you should get -bash: mysql: command not found.

How to install MySQL 5.7.x on Mac OS Sierra

I need to obtain the functionality of MySQL 5.7. I had zend server 9 (first 9 version). After reinstallation of zend server (it doesn't supports upgrade).
- Result: MySQL 5.5 !
May there exist solutions for:
Upgrade mysql inside zend framework?
Install other apache2.4+mysql5.7+php7 developer server?
some other solution.
Requirements:
PHP7.0.8 or later
MySQL 5.7
Apache 2.4 or later
Uninstall your existing version of mysql and install mysql 5.7
mysql.server stop # kill the running process
brew uninstall mysql # uninstall mysql
brew update # update brew
brew install mysql#5.7 # install mysql 5.7
Now you can start mysql.server with /usr/local/opt/mysql#5.7/bin/mysql.server start
Modify your PATH variable in ~/.bash_profile so you can start it with just mysql.server start
# ~/.bash_profile
export PATH="/usr/local/opt/mysql#5.7/bin:$PATH"
mysql.com offers a automatic dmg installer, which I find I have the most success with. It typically installs in /usr/local/mysql so you may want to try deleting any other installations you have on your system first.
You can download it here:
https://dev.mysql.com/downloads/mysql/
As for apache and php I find that I typically stick with the ones preloaded into os x, you can There are a number of articles out there on how to active these, but I believe its just a matter of uncommenting the php LoadModule line in /etc/apache2/httpd.conf
#LoadModule php5_module libexec/apache2/libphp5.so
and then starting apache in terminal with the apachectl command.
I installed https://dbngin.com/
Then after that i went to /usr/local
Then I saw a folder name for each of the MySQL versions I had installed using dbngin
Then after that I added it to path. Then that was it.
echo 'export PATH="/usr/local/path-to-mysql/bin:$PATH"' >> ~/.zshrc
You know, after MySQL is uninstalled and reinstalled via homebrew, it will prompt: 1. Upgrade to macOS 10.13; 2. Upgrade to Xcode 9.2.
If you don't want to upgrade the system or Xcode version, then request the MySQL official website to download:
https://downloads.mysql.com/archives/community/
The MySQL version suitable for macOS 10.12 ranges from 5.7.17 to 5.7.23.

How to clean up bad mysql and mariadb installation and install fresh mariadb on CentOS7?

I have a fresh install of CentOS7 on ovh.com VPS. It comes with MariaDB support by default, but I run these commands, as I wanted to use MySQL:
rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
Retrieving httpd://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
warning: /var/tmp/rpm-tmp.eke8Kn: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
yum install mysql-server
systemctl start mysqld
After that I tried entering:
/usr/bin/mysql_secure_installation
But this part did not work. I tried pressing Enter, entering root password, and entering new password (created for this), and none of these actions worked.
Error: Access denied for user 'root#localhost' *(using password: YES)
I run:
yum remove mysql
and it kind of went through, but I am not sure.
I then tried installing MariaDB with the following actions:
1) I added the following to /etc/yum.repos.d/MariaDB.repo:
# MariaDB 10.1 CentOS repository list - created 2015-10-29 18:46 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
2) I then run:
yum install MariaDB-server MariaDB-client
The last two are based on their website. MariaDB does not seem to be working or be installed.
I would like to reverse all these actions, come back to 0, and just install the newest version of MariaDB. Can somebody guide me through this, and tell me what to do. I am new to Linux. I read quite a lot of books, recently, but on this I am just stuck...
Thanks!
This is solved now. I was using "e17" instead of "el7".
Thanks.

Upgrade to MariaDB 10 from MariaDB 5.5 via yum fails

I want to upgrade mariadb from 5.5... to 10. But when I run "yum update -y", screen show like below:
Upgrading directly from MySQL <unrecognized version package MariaDB-server-5.5.36-1.el6.x86_64
MariaDB-server-5.5.36-1.el6.x86_64 is not installed> to MariaDB 10.0 may not
be safe in all cases. A manual dump and restore using mysqldump is
recommended. It is important to review the MariaDB manual's Upgrading
section for version-specific incompatibilities.
A manual upgrade is required.
- Ensure that you have a complete, working backup of your data and my.cnf
files
- Shut down the MySQL server cleanly
- Remove the existing MySQL packages. Usually this command will
list the packages you should remove:
rpm -qa | grep -i '^mysql-'
You may choose to use 'rpm --nodeps -ev <package-name>' to remove
the package which contains the mysqlclient shared library. The
library will be reinstalled by the MariaDB-shared package.
- Install the new MariaDB packages supplied by Monty Program AB
- Ensure that the MariaDB server is started
- Run the 'mysql_upgrade' program
How can I fix this issue?
I fix by myself, I post here for anyone need:
I run,
rpm -qa | grep -i '^maria'
Screen show:
MariaDB-common-10.0.12-1
MariaDB-client-10.0.12-1
MariaDB-server-5.5.38-1
MariaDB-shared-10.0.12-1
My "MariaDB-server" is still 5.5, I stop and remove it (backup all before do change anything):
yum remove MariaDB-server
then install again:
yum install MariaDB-server
screen:
Total size: 56 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : MariaDB-server 1/1
Installed:
MariaDB-server.i386 0:10.0.12-1
run again:
rpm -qa | grep -i '^maria'
screen show:
MariaDB-common-10.0.12-1
MariaDB-client-10.0.12-1
MariaDB-server-10.0.12-1
MariaDB-shared-10.0.12-1
It's OK.
I recently found steps on the official MariaDB website for upgrading to the latest stable version.
under /etc/yum.repos.d/ add MariaDB.repo with the following configs:
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
Run sudo yum install MariaDB-server MariaDB-client
Full steps can be found in this tutorial