Страница 1 из 2

Galera cluster с mariaDB 10.11

Добавлено: Ср окт 09, 2024 6:04 pm
Goryanin
Хочу настроить репликацию БД между тремя серверами.
Хотел использовать Галеру, но для MariaDB 10.11 нужна галера-4, а в панели остается установленной галера-3. Если же переустановить галеру на версию 4, то крашится mariaDB.
Как можно реализовать задуманное?
Возможно я упускаю что-то очевидное?

Re: Galera cluster с mariaDB 10.11

Добавлено: Ср окт 09, 2024 6:11 pm
sbury

Код: Выделить всё

cat /etc/os-release

Re: Galera cluster с mariaDB 10.11

Добавлено: Ср окт 09, 2024 6:12 pm
Goryanin

Код: Выделить всё

PRETTY_NAME="Ubuntu 22.04.5 LTS"                                                                                      
NAME="Ubuntu"                                                                                                         
VERSION_ID="22.04"                                                                                                    
VERSION="22.04.5 LTS (Jammy Jellyfish)"                                                                               
VERSION_CODENAME=jammy                                                                                                
ID=ubuntu                                                                                                             
ID_LIKE=debian                                                                                                        
HOME_URL="https://www.ubuntu.com/"                                                                                    
SUPPORT_URL="https://help.ubuntu.com/"                                                                                
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"                                                                   
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"                                   
UBUNTU_CODENAME=jammy     

Re: Galera cluster с mariaDB 10.11

Добавлено: Ср окт 09, 2024 6:14 pm
sbury

Код: Выделить всё

apt-get update
apt-get install galera-4

Re: Galera cluster с mariaDB 10.11

Добавлено: Ср окт 09, 2024 6:19 pm
Goryanin

Код: Выделить всё

root@vmi876403:~# apt-get install galera-4                                                                            
Reading package lists... Done                                                                                         
Building dependency tree... Done                                                                                      
Reading state information... Done                                                                                     
The following packages were automatically installed and are no longer required:                                       
  libaio1 libcgi-fast-perl libcgi-pm-perl libfcgi-bin libfcgi-perl libfcgi0ldbl libhtml-template-perl mariadb1011     
  mariadb1011-common socat                                                                                            
Use 'apt autoremove' to remove them.                                                                                  
The following packages will be REMOVED:                                                                               
  galera-3 mariadb1011-server                                                                                         
The following NEW packages will be installed:                                                                         
  galera-4                                                                                                            
0 upgraded, 1 newly installed, 2 to remove and 10 not upgraded.                                                       
Need to get 720 kB of archives.                                                                                       
After this operation, 90.4 MB disk space will be freed.                                                               
Do you want to continue? [Y/n] Y                                                                                      
Get:1 http://asi-fs-d.contabo.net/ubuntu jammy/universe amd64 galera-4 amd64 26.4.9-1build1 [720 kB]
Fetched 720 kB in 0s (24.0 MB/s)
(Reading database ... 120258 files and directories currently installed.)                                              
Removing mariadb1011-server (1:10.11.6-0brainy0.22.04) ...                                                            
Removing galera-3 (25.3.34-1build1) ...                                                                               
Selecting previously unselected package galera-4.                                                                     
(Reading database ... 120096 files and directories currently installed.)                                              
Preparing to unpack .../galera-4_26.4.9-1build1_amd64.deb ...                                                         
Unpacking galera-4 (26.4.9-1build1) ...                                                                               
Setting up galera-4 (26.4.9-1build1) ...                                                                              
Processing triggers for man-db (2.10.2-1) ...                                                                         
root@vmi876403:~#       

Re: Galera cluster с mariaDB 10.11

Добавлено: Ср окт 09, 2024 6:36 pm
sbury
В какой момент крешится? Покажите ошибку?
Покажите вывод

Код: Выделить всё

dpkg -l | grep mariadb

Re: Galera cluster с mariaDB 10.11

Добавлено: Ср окт 09, 2024 6:39 pm
Goryanin
При установке галеры-4, аптгет удаляет мариадб10.11 (лог установки в сообщении выше) ну а обратиться к базе без базы не получается. 8-)

Re: Galera cluster с mariaDB 10.11

Добавлено: Ср окт 09, 2024 6:44 pm
Goryanin
Попытка переустановить mariadb через менеджер приложений

Код: Выделить всё

%5B%7B%22comm%22%3A%22%5C%2Fusr%5C%2Flocal%5C%2Fbrainycp%5C%2Fssh%5C%2Fpacket_manager%5C%2Fmysql%5C%2Fmysql.php+-a%3Dreinstall+-s%3DMariaDB10.11%22%2C%22array_succes%22%3A%7B%22status_mysql%22%3A%22success%2C%23stream_id%23%22%2C%22mysql%22%3A%221%22%2C%22mysql_version%22%3A%22MariaDB10.11%22%7D%2C%22array_start%22%3A%7B%22status_mysql%22%3A%22inprogress%2C%23stream_id%23%22%7D%2C%22array_unsucces%22%3A%7B%22status_mysql%22%3A%22unsuccess%2C%23stream_id%23%22%7D%2C%22test%22%3A%22END+OF+INSTALL%22%2C%22userowner%22%3A%22root%22%7D%2C%7B%22comm%22%3A%22%5C%2Fusr%5C%2Flocal%5C%2Fbrainycp%5C%2Fssh%5C%2Fpkg_manager_init.php+-a+update_file_config%22%7D%2C%7B%22comm%22%3A%22%5C%2Fusr%5C%2Flocal%5C%2Fbrainycp%5C%2Fsrc%5C%2Fcompiled%5C%2Fphp5%5C%2Fbin%5C%2Fphp+-q++%5C%2Fusr%5C%2Flocal%5C%2Fbrainycp%5C%2Fscripts%5C%2Fcluster.php+-a+sinhronisation_cluster+-f+%27packet%27%22%7D%5D/etc/brainy/conf/streams/packet_manager2_control_172849921623061
/usr/local/brainycp/ssh/packet_manager/mysql/mysql.php -a=reinstall -s=MariaDB10.11

Service: MariaDB10.11

Starting preinstall
Starting find Version
Current version MariaDB10.11
Reading package lists...
Building dependency tree...
Reading state information...
Package 'exim-mysql1011' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  dovecot libaio1 libcgi-fast-perl libcgi-pm-perl libclucene-core1v5
  libdbd-mysql-perl libdbi-perl libexttextcat-2.0-0 libexttextcat-data
  libfcgi-bin libfcgi-perl libfcgi0ldbl libhtml-template-perl libmysqlclient21
  libopendmarc2 libspf2-2 libstemmer0d mysql-common socat ssl-cert
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
END OF PREINSTALL
Starting install MySQL MariaDB10.11
Install MySQL MariaDB10.11
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 galera-4 : Breaks: galera-3 (< 26.4) but 25.3.34-1build1 is to be installedReading package lists...
Building dependency tree...
Reading state information...
libmariadb3 is already the newest version (1:10.6.18-0ubuntu0.22.04.1).
The following packages were automatically installed and are no longer required:
  libaio1 libcgi-fast-perl libcgi-pm-perl libfcgi-bin libfcgi-perl
  libfcgi0ldbl libhtml-template-perl socat
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.Reading package lists...
Building dependency tree...
Reading state information...
libmariadb3 is already the newest version (1:10.6.18-0ubuntu0.22.04.1).
The following packages were automatically installed and are no longer required:
  libaio1 libcgi-fast-perl libcgi-pm-perl libfcgi-bin libfcgi-perl
  libfcgi0ldbl libhtml-template-perl socat
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.Starting postinstall

Memory detected: 30812436

END OF INSTALL/usr/local/brainycp/ssh/pkg_manager_init.php -a update_file_config

Run process...


Process completed.
/usr/local/brainycp/src/compiled/php5/bin/php -q  /usr/local/brainycp/scripts/cluster.php -a sinhronisation_cluster -f 'packet'

Re: Galera cluster с mariaDB 10.11

Добавлено: Ср окт 09, 2024 6:46 pm
Goryanin

Код: Выделить всё

root@vmi876403:~# dpkg -l | grep mariadb                                                                              
ii  libmariadb3:amd64                     1:10.6.18-0ubuntu0.22.04.1              amd64        MariaDB database client
 library                                                                                                              
ii  mariadb1011-libs                      1:10.11.6-0brainy0.22.04                amd64        The mariadb-libs packag
e provides the essential shared libraries for any 

Re: Galera cluster с mariaDB 10.11

Добавлено: Ср окт 09, 2024 6:51 pm
sbury
Покажите вывод

Код: Выделить всё

apt-get install mariadb1011-server