Change ownCloud database from default SQLite to MariaDB etc. (CentOS7)

background

Method

procedure

Update ownCloud config file

cinfig.php


'mysql.utf8mb4' => true,

MariaDB configuration update and restart

MariaDB update

# rpm -qa | grep -i mariadb
mariadb-5.5.50-1.el7_2.x86_64
mariadb-libs-5.5.56-2.el7.x86_64
mariadb-server-5.5.50-1.el7_2.x86_64
mariadb-libs-5.5.50-1.el7_2.x86_64
mariadb-5.5.56-2.el7.x86_64
# systemctl stop mariadb
# sudo yum update mariadb-server -y
# rpm -qa | grep -i mariadb
MariaDB-common-10.5.5-1.el7.centos.x86_64
MariaDB-server-10.5.5-1.el7.centos.x86_64
MariaDB-client-10.5.5-1.el7.centos.x86_64
MariaDB-compat-10.5.5-1.el7.centos.x86_64
# systemctl start mariadb
# ss -ltn | grep 3306
LISTEN     0      80          :::3306

MariaDB configuration update

# cp -p /etc/my.cnf /etc/my.cnf.bak

/etc/my.cnf


[mysqld]
   :
Omitted Conventional settings
   :
key_buffer_size         = 32M
table_cache             = 400
query_cache_size        = 128M
#in InnoDB:
innodb_flush_method=O_DIRECT
innodb_flush_log_at_trx_commit=1
innodb_log_file_size=256M
innodb_log_buffer_size = 128M
innodb_buffer_pool_size=2048M
innodb_buffer_pool_instances=3
innodb_read_io_threads=4
innodb_write_io_threads=4
innodb_io_capacity = 500
innodb_thread_concurrency=2
innodb_file_format=Barracuda
innodb_file_per_table=ON
innodb_large_prefix = 1
character-set-server  = utf8mb4
collation-server      = utf8mb4_general_ci

MariaDB restart

# systemctl start mariadb
# systemctl status mariadb
● mariadb.service - MariaDB 10.5.5 database server
   :
   :
Omission

Convert database with occ command

# cd /var/www/html/owncloud
# sudo -u apache php occ db:convert-type --clear-schema --all-apps mysql owncloud 127.0.0.1 owncloud
This feature is currently experimental.
Enter a password to access a target database: 
Clearing schema in new database
Creating schema in new database
oc_account_terms
    0 [>---------------------------]
   :
   :
Omission
   :
   :
oc_vcategory_to_object
    0 [>---------------------------]

** It's over **

Recommended Posts

Change ownCloud database from default SQLite to MariaDB etc. (CentOS7)
Change from SQLite3 to PostgreSQL
Change DB from SQLite to MySQL
[Ruby on Rails] From MySQL construction to database change
[JDBC] I tried to access the SQLite3 database from Java.
Upgrade from MYSQL5.7 to 8.0 on CentOS 6.7
How to install MariaDB 10.4 on CentOS 8
How to change from HTML to Haml
Change from SQLite3 to PostgreSQL in a new Ruby on Rails project
Job change from SIer to Web engineer