切换从Ubuntu的MySQL 5.5至MariaDB 10.0.6

根据这篇文章的参考,我从MySQL切换到了MariaDB。
http://qiita.com/pb_tmz08/items/9cddfccc6615d1a089f2

沉迷其中的事情。

sudo apt-get install mariadb-server-10.0 mariadb-common mariadb-client

在执行该命令时,会询问是否要覆盖my.cnf文件,
使用“D”选项来轻松检查差异,
在另一个标签页中备份my.cnf文件。

直接在现场用“Y”覆盖安装后,稍后将差异部分添加到my.cnf中,然后重新启动mysql。

只有字符编码和bind-address的注释有所变动。
然而,由于将[client]的default-character-set = utf8设置写入[mysqld]中造成重新启动失败的情况发生过,我们应该注意避免这种情况。

...

[client]
port            = 3306
socket          = /var/run/mysqld/mysqld.sock

default-character-set = utf8

...
[mysqld]
#
# * Basic Settings
#
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
lc_messages_dir = /usr/share/mysql
lc_messages     = en_US
skip-external-locking
character-set-server = utf8
skip-character-set-client-handshake

#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address           = 127.0.0.1

为了安全起见,请重新启动MySQL。

使用sudo /etc/init.d/mysql restart命令。