Academy and Foundation unixmens | Your skills, Your future
2.3K subscribers
6.68K photos
1.39K videos
1.24K files
6.17K links
@unixmens_support
@yashar_esm
[email protected]
یک کانال علمی تکنولوژی
فلسفه متن باز-گنو/لینوکس-امنیت - اقتصاد
دیجیتال
Technology-driven -بیزینس های مبتنی بر تکنولوژی
Enterprise open source
ارایه دهنده راهکارهای ارتقای سازمانی - فردی - تیمی
Download Telegram
https://mariadb.com/resources/blog/getting-started-with-the-mariadb-maxscale-gui/





در واقع MariaDB MaxScale یک پراکسی پایگاه داده پیشرفته و یک جزء اصلی از پلتفرم MariaDB است که مولفه های دسترسی پذیری بالا ، مقیاس‌پذیری، امنیت و یکپارچه‌سازی سازمانی را ارایه میدهد . MariaDB MaxScale 2.5 بسیاری از ویژگی های جدید را ارائه می دهد، از جمله MaxScale GUI، یک رابط کاربری گرافیکی برای مدیریت MaxScale. رابط کاربری گرافیکی MaxScale جایگزینی برای استفاده از ابزار خط فرمان MaxCtrl یا ویرایش مستقیم فایل پیکربندی می‌کند و تغییرات زنده و پویا را در MaxScale در محیط‌های عملیاتی بیشتری نسبت به قبل در دسترس قرار می‌دهد.




#mysql #mariadb #maxscale


@unixmens
چگونه با keepalived وضعیت mariadb را بررسی کنیم و HA برای آن پیاده سازی کنیم :‌

ا Keepalived نرم افزاری است که راهی برای انجام خوشه بندی با دسترسی بالا (HA) برای سیستم های لینوکس ارائه می دهد. می توان از آن برای نظارت بر سلامت خوشه ای از سرورها استفاده کرد و در صورت خرابی، ترافیک را به طور خودکار به یک سرور سالم منتقل کرد. این باعث می شود آن را به یک انتخاب محبوب برای راه اندازی در دسترس بودن بالا برای پایگاه های داده MariaDB تبدیل کند.

در اینجا مراحل اساسی برای استفاده از Keepalived برای MariaDB آمده است:

نصب Keepalived در همه گره ها: بسته Keepalived را روی هر سروری که بخشی از خوشه خواهد بود نصب کنید. این معمولاً با استفاده از مدیر بسته توزیع لینوکس شما قابل انجام است.

پیکربندی Keepalived: فایل پیکربندی برای Keepalived معمولاً در /etc/keepalived/keepalived.conf قرار دارد. برای پیکربندی آدرس IP مجازی که برای خوشه MariaDB استفاده می شود، باید این فایل را در هر گره ویرایش کنید.

در اینجا نمونه ای از یک فایل پیکربندی پایه برای Keepalived آمده است:

global_defs {
router_id mariadb_cluster
}

vrrp_script chk_mariadb {
script "/etc/keepalived/check_mariadb.sh"
interval 2
}

vrrp_instance VI_1 {
interface eth0
virtual_router_id 51
priority 101
advert_int 1
authentication {
auth_type PASS
auth_pass keepalived_password
}
virtual_ipaddress {
192.168.1.100/24 dev eth0
}
track_script {
chk_mariadb
}
}



در این مثال، آدرس IP مجازی که برای خوشه MariaDB استفاده خواهد شد 192.168.1.100 است و نمونه Keepalived برای نظارت بر سلامت خوشه با استفاده از اسکریپت /etc/keepalived/check_mariadb.sh پیکربندی شده است. اسکریپت هر 2 ثانیه اجرا می شود تا اطمینان حاصل شود که سرویس MariaDB به درستی اجرا می شود.





یا این اسکریپت :‌

vrrp_script chk_mariadb {
script "/usr/local/bin/check_mariadb.sh"
interval 2
weight 2
}

vrrp_instance VI_1 {
interface eth0
state MASTER
virtual_router_id 51
priority 101
virtual_ipaddress {
192.168.1.100
}
track_script {
chk_mariadb
}
}


در این اسکریپت، قسمت vrrp_script اسکریپتی را تعریف می کند که وضعیت سرویس MariaDB را بررسی می کند که در /usr/local/bin/check_mariadb.sh قرار دارد. این اسکریپت باید یک کد خروجی 0 را در صورت اجرا شدن سرویس و یک کد خروجی غیر صفر را در صورت عدم اجرای آن برگرداند.

بخش vrrp_instance آدرس IP مجازی و سایر پارامترها را برای نمونه Keepalived تعریف می کند. در این مثال، نمونه VI_1 نام دارد و روی حالت MASTER تنظیم شده است، به این معنی که گره فعال است. شناسه روتر مجازی روی 51 و اولویت روی 101 تنظیم شده است که نشان می دهد این گره گره اصلی ترجیحی است.

بخش virtual_ipaddress آدرس IP مجازی را که کلاینت ها برای اتصال به خوشه MariaDB استفاده می کنند، تعریف می کند.

در نهایت، بخش track_script اسکریپت chk_mariadb را که قبلاً به عنوان اسکریپت برای نظارت بر وضعیت سرویس MariaDB تعریف شده است، مشخص می کند. اگر این اسکریپت یک کد خروج غیر صفر را برگرداند، نمونه Keepalived به حالت BACKUP منتقل می شود، که نشان می دهد این گره دیگر گره اصلی نیست.

نکته :‌ نیاز هست mariadb روی یک ip بایند شود :

[mysqld]
bind-address=192.168.1.100


و اما یک نمونه از اسکریپت check_mariadb.sh :‌
#!/bin/bash

# Set variables
MYSQL_HOST="localhost"
MYSQL_PORT="3306"
MYSQL_USERNAME="root"
MYSQL_PASSWORD="password"
MYSQL_DB="mydatabase"

# Check MariaDB status
MYSQL_STATUS=$(mysql -h ${MYSQL_HOST} -P ${MYSQL_PORT} -u ${MYSQL_USERNAME} -p${MYSQL_PASSWORD} -e "SHOW STATUS LIKE 'wsrep_cluster_size';" ${MYSQL_DB} 2>/dev/null | awk '/wsrep_cluster_size/ {print $2}')

# If MariaDB is running and in sync, exit with status 0
if [[ ${MYSQL_STATUS} -ge 2 ]]; then
exit 0
fi

# If MariaDB is not running or out of sync, exit with status 1
exit 1

این اسکریپت وضعیت پایگاه داده MariaDB را با پرس و جو از متغیر وضعیت wsrep_cluster_size آن بررسی می کند. اگر متغیر 2 یا بیشتر باشد، فرض می‌کند که پایگاه داده در حال اجرا و هماهنگ است و با وضعیت 0 (موفقیت) خارج می‌شود. اگر متغیر کمتر از 2 باشد، فرض می کند پایگاه داده در حال اجرا نیست یا هماهنگ نیست و با وضعیت 1 (شکست) خارج می شود.

#keepalive #keepalived #linux #cluster #mariadb #mysql #database
https://t.iss.one/unixmens
کتاب مرجع oracle mysql |mariadb که سالها پیش نوشته بودم . تقدیم عزیزان



MariaDB and MySQL are both popular open-source relational database management systems (RDBMS) that are used to store, organize, and manage data. They are both based on the same core software, which was originally developed by MySQL AB, but MariaDB is a fork of MySQL that was created in 2009 due to concerns about the acquisition of MySQL by Oracle Corporation.

MariaDB and MySQL have many similarities, including their architecture, syntax, and functionality. Both databases use SQL (Structured Query Language) to manage data and support a wide range of programming languages. They also offer features such as replication, clustering, and partitioning to improve performance and scalability.

However, there are also some differences between MariaDB and MySQL. MariaDB has some additional features and improvements over MySQL, such as better performance, improved security, and more storage engines. MariaDB also supports more data types than MySQL and has more built-in functions.

Overall, both MariaDB and MySQL are powerful and reliable RDBMS options for managing data, and the choice between them may depend on specific needs and preferences.

#db #dba #yashar_esmaildokht #book #mariadb #oracle #mysql 📕 📖

https://t.iss.one/unixmens
4
کتاب مرجع oracle mysql |mariadb که سالها پیش نوشته بودم . تقدیم عزیزان



MariaDB and MySQL are both popular open-source relational database management systems (RDBMS) that are used to store, organize, and manage data. They are both based on the same core software, which was originally developed by MySQL AB, but MariaDB is a fork of MySQL that was created in 2009 due to concerns about the acquisition of MySQL by Oracle Corporation.

MariaDB and MySQL have many similarities, including their architecture, syntax, and functionality. Both databases use SQL (Structured Query Language) to manage data and support a wide range of programming languages. They also offer features such as replication, clustering, and partitioning to improve performance and scalability.

However, there are also some differences between MariaDB and MySQL. MariaDB has some additional features and improvements over MySQL, such as better performance, improved security, and more storage engines. MariaDB also supports more data types than MySQL and has more built-in functions.

Overall, both MariaDB and MySQL are powerful and reliable RDBMS options for managing data, and the choice between them may depend on specific needs and preferences.

#db #dba #yashar_esmaildokht #book #mariadb #oracle #mysql 📕 📖

https://t.iss.one/unixmens
کتاب مرجع oracle mysql |mariadb که سالها پیش نوشته بودم . تقدیم عزیزان



MariaDB and MySQL are both popular open-source relational database management systems (RDBMS) that are used to store, organize, and manage data. They are both based on the same core software, which was originally developed by MySQL AB, but MariaDB is a fork of MySQL that was created in 2009 due to concerns about the acquisition of MySQL by Oracle Corporation.

MariaDB and MySQL have many similarities, including their architecture, syntax, and functionality. Both databases use SQL (Structured Query Language) to manage data and support a wide range of programming languages. They also offer features such as replication, clustering, and partitioning to improve performance and scalability.

However, there are also some differences between MariaDB and MySQL. MariaDB has some additional features and improvements over MySQL, such as better performance, improved security, and more storage engines. MariaDB also supports more data types than MySQL and has more built-in functions.

Overall, both MariaDB and MySQL are powerful and reliable RDBMS options for managing data, and the choice between them may depend on specific needs and preferences.

#db #dba #yashar_esmaildokht #book #mariadb #oracle #mysql 📕 📖

https://t.iss.one/unixmens
2
کتاب مرجع oracle mysql |mariadb که سالها پیش نوشته بودم . تقدیم عزیزان



MariaDB and MySQL are both popular open-source relational database management systems (RDBMS) that are used to store, organize, and manage data. They are both based on the same core software, which was originally developed by MySQL AB, but MariaDB is a fork of MySQL that was created in 2009 due to concerns about the acquisition of MySQL by Oracle Corporation.

MariaDB and MySQL have many similarities, including their architecture, syntax, and functionality. Both databases use SQL (Structured Query Language) to manage data and support a wide range of programming languages. They also offer features such as replication, clustering, and partitioning to improve performance and scalability.

However, there are also some differences between MariaDB and MySQL. MariaDB has some additional features and improvements over MySQL, such as better performance, improved security, and more storage engines. MariaDB also supports more data types than MySQL and has more built-in functions.

Overall, both MariaDB and MySQL are powerful and reliable RDBMS options for managing data, and the choice between them may depend on specific needs and preferences.

#db #dba #yashar_esmaildokht #book #mariadb #oracle #mysql 📕 📖

https://t.iss.one/unixmens
کتاب مرجع oracle mysql |mariadb که سالها پیش نوشته بودم . تقدیم عزیزان



MariaDB and MySQL are both popular open-source relational database management systems (RDBMS) that are used to store, organize, and manage data. They are both based on the same core software, which was originally developed by MySQL AB, but MariaDB is a fork of MySQL that was created in 2009 due to concerns about the acquisition of MySQL by Oracle Corporation.

MariaDB and MySQL have many similarities, including their architecture, syntax, and functionality. Both databases use SQL (Structured Query Language) to manage data and support a wide range of programming languages. They also offer features such as replication, clustering, and partitioning to improve performance and scalability.

However, there are also some differences between MariaDB and MySQL. MariaDB has some additional features and improvements over MySQL, such as better performance, improved security, and more storage engines. MariaDB also supports more data types than MySQL and has more built-in functions.

Overall, both MariaDB and MySQL are powerful and reliable RDBMS options for managing data, and the choice between them may depend on specific needs and preferences.

#db #dba #yashar_esmaildokht #book #mariadb #oracle #mysql 📕 📖

https://t.iss.one/unixmens
کتاب مرجع oracle mysql |mariadb که سالها پیش نوشته بودم . تقدیم عزیزان



MariaDB and MySQL are both popular open-source relational database management systems (RDBMS) that are used to store, organize, and manage data. They are both based on the same core software, which was originally developed by MySQL AB, but MariaDB is a fork of MySQL that was created in 2009 due to concerns about the acquisition of MySQL by Oracle Corporation.

MariaDB and MySQL have many similarities, including their architecture, syntax, and functionality. Both databases use SQL (Structured Query Language) to manage data and support a wide range of programming languages. They also offer features such as replication, clustering, and partitioning to improve performance and scalability.

However, there are also some differences between MariaDB and MySQL. MariaDB has some additional features and improvements over MySQL, such as better performance, improved security, and more storage engines. MariaDB also supports more data types than MySQL and has more built-in functions.

Overall, both MariaDB and MySQL are powerful and reliable RDBMS options for managing data, and the choice between them may depend on specific needs and preferences.

#db #dba #yashar_esmaildokht #book #mariadb #oracle #mysql 📕 📖

https://t.iss.one/unixmens