`
eimhee
  • 浏览: 2153029 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Migrate MySQL to MariaDB in Ubuntu 12.10

 
阅读更多

If you have MySQL installed on an Ubuntu (12.10) server and are looking to migrate to MariaDB , here are the steps to migrate over to MariaDB 10.

MariaDB is a drop-in replacement for MySQL - you don’t need to export then import your databases - it just works

 

Remove MySQL

 

sudo apt-get install software-properties-common                                                                                                                                        
sudo apt-get remove mysql-server                                                                                                                                                       
sudo apt-get remove mysql-server-5.5                                                                                                                                                   
sudo apt-get remove mysql-server-core-5.5   

 

 

Add MariaDB repository

mysql  Ver 15.1 Distrib 10.0.3-MariaDB, for debian-linux-gnu (i686) using readline 5.1 

 

 

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db                                                                                                       
sudo add-apt-repository 'deb http://mirror.aarnet.edu.au/pub/MariaDB/repo/10.0/ubuntu quantal main'                                                                                    
sudo apt-get update                                                                                                                                                                    
sudo apt-get install mariadb-server  

 

 

Check that its worked

 

mysql --version        

 

 

If the migration was a success it’ll says the distribution of mysql is MariaDB - similar to below

mysql  Ver 15.1 Distrib 10.0.3-MariaDB, for debian-linux-gnu (i686) using readline 5.1 

 

参考 https://downloads.mariadb.org/mariadb/repositories/#mirror=qiming&distro=Ubuntu&distro_release=raring&version=10.0

 

服务器测试结果,

用MYSQL时CPU使用情况

top | grep mysql

 

写道
11644 mysql 20 0 16.5g 9.2g 7844 S 8.6 29.2 5207:00 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 66.5 29.2 5207:02 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 9.6 29.2 5207:02 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 6.0 29.2 5207:02 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 6.0 29.2 5207:03 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 7.6 29.2 5207:03 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 8.7 29.2 5207:03 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 22.3 29.2 5207:03 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 7.3 29.2 5207:03 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 4.7 29.2 5207:04 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 7.3 29.2 5207:04 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 10.0 29.2 5207:04 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 8.0 29.2 5207:04 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 6.7 29.2 5207:04 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 8.3 29.2 5207:05 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 101.5 29.2 5207:08 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 24.6 29.2 5207:09 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 43.3 29.2 5207:10 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 35.0 29.2 5207:11 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 23.0 29.2 5207:12 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 16.3 29.2 5207:12 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 13.6 29.2 5207:12 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 10.6 29.2 5207:13 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 13.0 29.2 5207:13 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 6.3 29.2 5207:13 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 6.7 29.2 5207:14 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 8.0 29.2 5207:14 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 8.6 29.2 5207:14 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 14.0 29.2 5207:14 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 7.3 29.2 5207:15 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 7.3 29.2 5207:15 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 6.7 29.2 5207:15 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 12.0 29.2 5207:15 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 4.7 29.2 5207:16 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 3.7 29.2 5207:16 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 13.3 29.2 5207:16 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 10.3 29.2 5207:16 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 9.6 29.2 5207:17 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 9.3 29.2 5207:17 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 4.6 29.2 5207:17 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 8.6 29.2 5207:17 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 7.6 29.2 5207:18 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 8.3 29.2 5207:18 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 5.0 29.2 5207:18 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 5.7 29.2 5207:18 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 11.3 29.2 5207:19 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 8.6 29.2 5207:19 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 10.0 29.2 5207:19 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 10.6 29.2 5207:19 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 8.7 29.2 5207:20 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 5.7 29.2 5207:20 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 11.3 29.2 5207:20 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 9.3 29.2 5207:20 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 10.3 29.2 5207:21 mysqld
11644 mysql 20 0 16.5g 9.2g 7844 S 8.0 29.2 5207:21 mysqld

 

 

使用MariaDB之后

写道
4159 mysql 20 0 13.2g 1.3g 10m S 7.0 4.1 0:26.66 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 6.3 4.1 0:26.85 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 7.6 4.1 0:27.08 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 6.0 4.1 0:27.26 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 3.3 4.2 0:27.36 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 7.3 4.2 0:27.58 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 5.3 4.2 0:27.74 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 7.3 4.2 0:27.96 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 7.0 4.2 0:28.17 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 4.3 4.2 0:28.30 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 7.3 4.2 0:28.52 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 4.7 4.2 0:28.66 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 5.3 4.2 0:28.82 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 6.0 4.2 0:29.00 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 4.7 4.2 0:29.14 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 5.3 4.2 0:29.30 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 6.7 4.2 0:29.50 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 8.3 4.2 0:29.75 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 5.0 4.2 0:29.90 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 4.3 4.2 0:30.03 mysqld
4159 mysql 20 0 13.2g 1.3g 10m S 7.3 4.2 0:30.25 mysqld

 

可见用MariaDB的CPU使用率很平稳, 使用率也低了一些

0
3
分享到:
评论

相关推荐

    Migrating to MariaDB: Toward an Open Source Database Solution

    Let the author’s experience in migrating a financial firm to MariaDB inform your own efforts, helping you to develop a road map for both technical and political success within your own organization ...

    Practical PHP 7, MySQL 8, and MariaDB Website Databases, Second Edition

    The PHP required is taught in context within each project so you can quickly learn how PHP integrates with MariaDB and MySQL to create powerful database-driven websites. Each project is fully ...

    mysql migration to oracle

    在IT领域,数据库迁移是一项复杂但至关重要的任务,尤其是在从MySQL迁移到Oracle这样的场景下。以下是对这一过程的深入解析,旨在为面临相似挑战的技术人员提供实用指导。 ### MySQL迁移至Oracle的关键步骤 #### 1...

    Paragon.Migrate.OS.to.SSD.v4.0.x64.HAPPY.NEW.YEAR-DVT.zip

    标题中的“Paragon Migrate OS to SSD v4.0 x64”是一款专门用于操作系统迁移的软件工具,由Paragon Software公司开发。该版本号“v4.0”表明这是该软件的第四次主要更新,而“x64”则表示它支持64位操作系统。后缀...

    How to Migrate Email to the Cloud-EN.pdf

    How to Migrate Email to the Cloud-EN.pdf

    How to Migrate Email to the Cloud-CN.pdf

    How to Migrate Email to the Cloud-CN.pdf

    Go-migrate-在Golang中的数据库迁移处理

    它支持多种主流数据库系统,包括MySQL、PostgreSQL、Cassandra和SQLite,这使得它成为一个灵活且跨平台的解决方案。 首先,让我们详细了解Go-migrate的工作原理。数据库迁移通常涉及对数据库结构的变更,如添加或...

    Practical PHP 7, MySQL 8, and MariaDB Website Databases, 2nd Edition--2018

    What You Will Learn Build a secure database-driven website using PHP 7, MySQL 8, and MariaDB Create a product catalog Write a message board ... Migrate to Oracle’s MySQL 8 Server platform

    A Guide for Migrating From Oracle to MySQL

    With the rapid growth of MySQL in the database market, many corporations, government agencies, educational institutions, and others have begun to migrate away from their expensive and proprietary ...

    Upgrade, Migrate & Consolidate to Oracle Database 12c

    Upgrade, Migrate & Consolidate to Oracle Database 12c: Strategies, General Preparation Steps, Upgrade & Migration Cases; Fallback Strategies; New Features in Oracle 12c; Performance Management.

    mysql:db-migrate mysql驱动程序

    MySQL的`db-migrate`是一个基于Node.js的数据库迁移工具,它允许开发者通过编写JavaScript代码来管理数据库结构的变化。这个工具对于保持数据库版本控制和在不同环境中同步数据模型非常有用。`db-migrate mysql ...

    MySQL 8 Cookbook epub 格式

    If you've already worked with MySQL before and are looking to migrate your application to MySQL 8, this book will also show you how to do that. The book also contains recipes on efficient MySQL ...

    Migrate from Oracle 9i RAC to 10g RAC

    #### 标题解析:Migrate from Oracle 9i RAC to 10g RAC 标题明确了本文档的主要内容是关于如何从Oracle 9i Real Application Clusters (RAC) 数据库迁移至Oracle 10g RAC数据库的过程。这涉及到数据库架构、软件...

    28119_white_paper_reasons_to_migrate_to_delphi_xe.ZIP.zip

    本压缩包文件“28119_white_paper_reasons_to_migrate_to_delphi_xe.ZIP.zip”包含了一份名为“Reasons_to_migrate_to_Delphi_XE_White_Paper.pdf”的白皮书,专门讨论了迁移到Delphi XE的种种优势。以下将详细阐述...

    Migrate ARM Compiler 5 to ARM Compiler 6 中文翻译版

    Migrate ARM Compiler 5 to ARM Compiler 6 中文翻译版本

    Laravel开发-laravel-mysql-to-seeder

    在“Laravel开发-laravel-mysql-to-seeder”这个项目中,重点是将MySQL数据库的数据转换为Laravel的Seeder类,以便在新环境中轻松地重新创建或填充数据。以下是关于Laravel开发和Seeder的详细知识点: 1. **Laravel...

    解决jira 7.2.2安装时无法连接5.7版本mysql数据库的问题

    本问题聚焦于一个具体的实例,即在尝试安装Jira 7.2.2时遇到了无法连接到MySQL 5.7数据库的难题。这个问题的核心在于数据库连接驱动的兼容性问题。 首先,Jira是一款非常流行的项目管理和问题追踪工具,它依赖于...

    jquery-migrate-3.0.0.zip

    <script src="path/to/jquery-migrate-3.0.0.min.js"> ``` 这样,当jQuery运行时,jQuery Migrate会自动检测并修复不兼容的问题。 需要注意的是,虽然jQuery Migrate可以暂时解决兼容性问题,但它并不推荐作为长期...

Global site tag (gtag.js) - Google Analytics