mariadb mysql 相關

舊資料參考 mysql 相關

mysql 查詢版本

select version();
SELECT @@version;

或 SHOW VARIABLES LIKE “%version%”;

或 status;

參考資料:

How to Check the MySQL Version

========================================

mysql 轉移至 mariadb

從wheezy mysql 5.5 移轉至mariadb 5.5z

只要更新套件庫再安裝mariadb-server 即可

sudo apt-get install python-software-properties
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
sudo add-apt-repository 'deb [arch=amd64,i386] http://ftp.ubuntu-tw.org/mirror/mariadb/repo/5.5/debian wheezy main'
sudo apt-get update
sudo apt-get install mariadb-server

參考資料:

Upgrading from MySQL to MariaDB 
Migrate MySQL 5.5 to MariaDB 10.0 on Debian 8
Downloads Setting up MariaDB Repositories

========================================

1080303

安裝MariaDB

apti mariadb-server
apti mysql_secure_installation
安全性的關係,mariadb 不給使用者 root登入(用sudo 是可以的)
解決的方法
use mysql;
update user set plugin='mysql_native_password' where user='root';
flush privileges; quit; 

參考文章:

How To Install MariaDB on Debian 9

========================================

MariaDB  slave

把MariaDB 當成是Mysql(5.5)的slave

和Mysql 的slave 是樣的

server-id 記得要和其他的不一樣

參考文章:

Setting Up Replication

This entry was posted in 系統管理. Bookmark the permalink.