Upgrade MariaDB 5.5. to MariaDB 10.0.16 in Ubuntu 12.0.4

I’d been a little bit busy working MariaDB lately… deploying database in cloud since our company is gearing towards open source.

We’d been using MariaDB 5.5 for a while now and need to upgrade to #MariaDB 10

1. Login to your server and stop MariaDB. Don’t forget to create backup!!!!!

root@corpdevmariadb03:~# service mysql stop
* Stopping MariaDB database server mysqld                                                                                                                                                 [ OK ]
root@corpdevmariadb03:~#

2.importing signing keys

root@corpdevmariadb03:~# sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.8XWteckxjY --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
gpg: requesting key 1BB943DB from hkp server keyserver.ubuntu.com
gpg: key 1BB943DB: public key "MariaDB Package Signing Key " imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1
root@corpdevmariadb03:~#

3.Add MariaDB to your sources.list

root@corpdevmariadb03:~# sudo apt-get install python-software-properties
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-software-properties is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@corpdevmariadb03:~# sudo add-apt-repository 'deb http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu precise main'
root@corpdevmariadb03:~# sudo apt-get update
Get:1 http://sgp1.mirrors.digitalocean.com precise Release.gpg [181 B]
Get:2 http://sgp1.mirrors.digitalocean.com precise Release [2,261 B]
Get:3 http://sgp1.mirrors.digitalocean.com precise/main Sources [996 B]
Get:4 http://sgp1.mirrors.digitalocean.com precise/main amd64 Packages [5,661 B]
Get:5 http://sgp1.mirrors.digitalocean.com precise/main i386 Packages [5,652 B]
Ign http://sgp1.mirrors.digitalocean.com precise/main TranslationIndex
Ign http://sgp1.mirrors.digitalocean.com precise/main Translation-en_CA
Ign http://sgp1.mirrors.digitalocean.com precise/main Translation-en
Fetched 14.8 kB in 4s (3,537 B/s)
Reading package lists... Done
root@corpdevmariadb03:~# s

4. Now lets install MariaDB..

root@corpdevmariadb03:~# sudo apt-get install mariadb-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libmariadbclient18 libmysqlclient18 mariadb-client-10.0 mariadb-client-core-10.0 mariadb-server-10.0 mariadb-server-core-10.0
Suggested packages:
  tinyca mailx mariadb-test
The following packages will be REMOVED:
  mariadb-client-5.5 mariadb-client-core-5.5 mariadb-server-5.5 mariadb-server-core-5.5
The following NEW packages will be installed:
  mariadb-client-10.0 mariadb-client-core-10.0 mariadb-server-10.0 mariadb-server-core-10.0
The following packages will be upgraded:
  libmariadbclient18 libmysqlclient18 mariadb-server
3 upgraded, 4 newly installed, 4 to remove and 2 not upgraded.
Need to get 36.9 MB of archives.
After this operation, 17.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu/ precise/main libmariadbclient18 amd64 10.0.16+maria-1~precise [919 kB]
Get:2 http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu/ precise/main libmysqlclient18 amd64 10.0.16+maria-1~precise [2,966 B]
Get:3 http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu/ precise/main mariadb-server all 10.0.16+maria-1~precise [3,004 B]
Get:4 http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu/ precise/main mariadb-client-core-10.0 amd64 10.0.16+maria-1~precise [1,820 kB]
Get:5 http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu/ precise/main mariadb-client-10.0 amd64 10.0.16+maria-1~precise [6,233 kB]
Get:6 http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu/ precise/main mariadb-server-core-10.0 amd64 10.0.16+maria-1~precise [5,652 kB]
Get:7 http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu/ precise/main mariadb-server-10.0 amd64 10.0.16+maria-1~precise [22.3 MB]
Fetched 36.9 MB in 45s (805 kB/s)
Preconfiguring packages ...
(Reading database ... 38055 files and directories currently installed.)
Preparing to replace libmariadbclient18 5.5.36+maria-1~precise (using .../libmariadbclient18_10.0.16+maria-1~precise_amd64.deb) ...
Unpacking replacement libmariadbclient18 ...
Preparing to replace libmysqlclient18 5.5.36+maria-1~precise (using .../libmysqlclient18_10.0.16+maria-1~precise_amd64.deb) ...
Unpacking replacement libmysqlclient18 ...
Preparing to replace mariadb-server 5.5.36+maria-1~precise (using .../mariadb-server_10.0.16+maria-1~precise_all.deb) ...
Unpacking replacement mariadb-server ...
(Reading database ... 38055 files and directories currently installed.)
Removing mariadb-server-5.5 ...
* Stopping MariaDB database server mysqld                                                                                                                                                 [ OK ]
dpkg: mariadb-client-core-5.5: dependency problems, but removing anyway as you requested:
mariadb-client-5.5 depends on mariadb-client-core-5.5 (>= 5.5.36+maria-1~precise); however:
  Package mariadb-client-core-5.5 is to be removed.
Removing mariadb-client-core-5.5 ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Selecting previously unselected package mariadb-client-core-10.0.
(Reading database ... 37970 files and directories currently installed.)
Unpacking mariadb-client-core-10.0 (from .../mariadb-client-core-10.0_10.0.16+maria-1~precise_amd64.deb) ...
dpkg: mariadb-client-5.5: dependency problems, but removing anyway as you requested:
percona-xtrabackup depends on mysql-client; however:
  Package mysql-client is not installed.
  Package mariadb-client-5.5 which provides mysql-client is to be removed.
(Reading database ... 37977 files and directories currently installed.)
Removing mariadb-client-5.5 ...
Selecting previously unselected package mariadb-client-10.0.
(Reading database ... 37936 files and directories currently installed.)
Unpacking mariadb-client-10.0 (from .../mariadb-client-10.0_10.0.16+maria-1~precise_amd64.deb) ...
Setting up libmysqlclient18 (10.0.16+maria-1~precise) ...
Setting up libmariadbclient18 (10.0.16+maria-1~precise) ...
Setting up mariadb-client-core-10.0 (10.0.16+maria-1~precise) ...
Setting up mariadb-client-10.0 (10.0.16+maria-1~precise) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
(Reading database ... 37977 files and directories currently installed.)
Removing mariadb-server-core-5.5 ...
Selecting previously unselected package mariadb-server-core-10.0.
(Reading database ... 37898 files and directories currently installed.)
Unpacking mariadb-server-core-10.0 (from .../mariadb-server-core-10.0_10.0.16+maria-1~precise_amd64.deb) ...
Selecting previously unselected package mariadb-server-10.0.
Unpacking mariadb-server-10.0 (from .../mariadb-server-10.0_10.0.16+maria-1~precise_amd64.deb) ...
* Stopping MariaDB database server mysqld                                                                                                                                                 [ OK ]
Processing triggers for ureadahead ...
Setting up mariadb-server-core-10.0 (10.0.16+maria-1~precise) ...
Setting up mariadb-server-10.0 (10.0.16+maria-1~precise) ...
Installing new version of config file /etc/init.d/mysql ...
* Stopping MariaDB database server mysqld                                                                                                                                                 [ OK ]
2015-02-11 08:19:00 7f16a5a91780 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
150211  8:19:00 [Note] InnoDB: Using mutexes to ref count buffer pool pages
150211  8:19:00 [Note] InnoDB: The InnoDB memory heap is disabled
150211  8:19:00 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
150211  8:19:00 [Note] InnoDB: Memory barrier is not used
150211  8:19:00 [Note] InnoDB: Compressed tables use zlib 1.2.3.4
150211  8:19:00 [Note] InnoDB: Using Linux native AIO
150211  8:19:00 [Note] InnoDB: Not using CPU crc32 instructions
150211  8:19:00 [Note] InnoDB: Initializing buffer pool, size = 2.0G
150211  8:19:00 [Note] InnoDB: Completed initialization of buffer pool
150211  8:19:00 [Note] InnoDB: Highest supported file format is Barracuda.
150211  8:19:00 [Note] InnoDB: 128 rollback segment(s) are active.
150211  8:19:00 [Note] InnoDB: Waiting for purge to start
150211  8:19:00 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.22-71.0 started; log sequence number 1618473
150211  8:19:00 [Note] Plugin 'FEEDBACK' is disabled.
150211  8:19:00 [Note] InnoDB: FTS optimize thread exiting.
150211  8:19:00 [Note] InnoDB: Starting shutdown...
150211  8:19:03 [Note] InnoDB: Shutdown completed; log sequence number 1618483
* Starting MariaDB database server mysqld                                                                                                                                                 [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.
Setting up mariadb-server (10.0.16+maria-1~precise) ...
root@corpdevmariadb03:~#

5. Login and check your newly upgraded database.

root@corpdevmariadb03:~# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 42
Server version: 10.0.16-MariaDB-1~precise-log mariadb.org binary distribution

Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)

MariaDB [(none)]> exit
Bye
root@corpdevmariadb03:~#

if you wonder if i executed mysql_upgrade…. yes i did see below.

root@corpdevmariadb03:~# mysql_upgrade -u root -p
Enter password:
This installation of MySQL is already upgraded to 10.0.16-MariaDB, use --force if you still need to run mysql_upgrade
root@corpdevmariadb03:~#

thanks for visiting.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s