Does MARIADB support TableSpaces? - mariadb

Does MARIADB support TableSpaces ? I want to know can I create table spaces in MARIA DB - as they allow to use INNODB .

What do you get from SELECT * FROM information_schema.INNODB_SYS_TABLESPACES? See https://mariadb.com/kb/en/mariadb/information-schema-tablespaces-table/ "starting with MariaDB 5.5". However: "The table is a MariaDB and MySQL extension, and does not include information about InnoDB tablespaces."
Why are you hoping for tablespaces?

Related

MariaDB System Versioned Tables Do Not Work Locally Even After MariaDB upgrade

So I used to have mysql installed on my mac via homebrew. I stared by uninstalling it and then installed maria with brew install mariadb
This shows me this version
> mysql --version
mysql Ver 15.1 Distrib 10.7.3-MariaDB, for osx10.17 (arm64) using EditLine wrapper
and this:
mariadb --version
mariadb Ver 15.1 Distrib 10.7.3-MariaDB, for osx10.17 (arm64) using EditLine wrapper
I can run mariadb and connect to it fine with this command:
mariadb -u root -p
However, I am not able to use the new feature of mariaDB called system versioned tables.
I have followed this guide: https://mariadb.com/kb/en/system-versioned-tables/ and entered this command
MySQL [(none)]> CREATE TABLE t ( x INT ) WITH SYSTEM VERSIONING;
Which gives this error:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SYSTEM VERSIONING' at line 1
To test this further, I created a MariaDB instance in aws and connected to it locally with the same command which works fine. The version that RDS supports is 10.6
Question: "Why can't does my local instance of mariadb not recognize the keyword SYSTEM?
I am not sure how to debug this locally and I would like to know why this version of mariadb is unable to recognize these command locally. Looking for some debugging tips.
EDIT: Another thing to check was to select version while in the mariadb console
MySQL [(none)]> select version();
+-----------+
| version() |
+-----------+
| 8.0.28 |
+-----------+
8.0.28 is a MySQL version, which doesn't have System Versioned Tables, only MariaDB does (at the time of this posting anyway).
As noted, mysql --version only shows the version of the MySQL (or MariaDB via compatibility links) client. It doesn't show the server version.

Cannot set the number of password retries in MariaDB

I did the following to set password restrictions for my users on MariaDB.
ALTER USER 'User Name' FAILED_LOGIN_ATTEMPTS 3 PASSWORD_LOCK_TIME 3;
But I get the following error and cannot do it.
Why is this?
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FAILED_LOGIN_ATTEMPTS 3 PASSWORD_LOCK_TIME 3' at line 1
As mentioned in the comments, MariaDB does not have this feature.

How to update/insert Cyrillic data in MySQL DB (Windows 10, XAMPP CP v3.2.4)?

I observe a strange situation in Windows 10 with XAMPP Control Panel v3.2.4
Terminal window is launched and connected to Mysql DB.
Note: prior in terminal window issued command 'chcp 65001' to support UTF8 encoding.
Now when I attempt to update some table with value which is in Cyrillic then MySQL complains about not closed quote symbol. If I replace Cyrillic input to English then command is accepted.
MariaDB [youtube]> update episodes set name='Катя' where id=11;
'>
If I attempt to insert a new record into DB same situation happens
MariaDB [youtube]> insert into episodes (youtube_id,series_id,season,episode,name) values (12345678904,1,0,1,'Катя');
'>
If double quotes are used situation is the same
MariaDB [youtube]> insert into episodes (youtube_id,series_id,season,episode,title) values (12345678904,1,0,1,"Катя");
">
What a magic touch required to make it work through terminal window?
Update:
John suggested to look into configuration file of MariaDB for UTF8 settings.
The settings was changed to the following and the problem still persists
# The MySQL server
default-character-set=utf8mb4
[mysqld]
init-connect=\'SET NAMES utf8\'
character_set_server=utf8
collation_server=utf8_unicode_ci
skip-character-set-client-handshake
character_sets-dir="C:/bin/XAMPP/App/xampp/mysql/share/charsets"
Initially settings was
# The MySQL server
default-character-set=utf8mb4
[mysqld]
character-set-server=utf8mb4
collation-server=utf8mb4_general_ci
Server status report
MariaDB [youtube]> \s
--------------
mysql Ver 15.1 Distrib 10.4.10-MariaDB, for Win64 (AMD64), source revision c24ec3cece6d8bf70dac7519b6fd397c464f7a82
Connection id: 17
Current database: youtube
Current user: root#localhost
SSL: Not in use
Using delimiter: ;
Server: MariaDB
Server version: 10.4.10-MariaDB mariadb.org binary distribution
Protocol version: 10
Connection: localhost via TCP/IP
Server characterset: utf8
Db characterset: utf8mb4
Client characterset: utf8mb4
Conn. characterset: utf8mb4
TCP port: 3306
Uptime: 11 min 12 sec
Threads: 7 Questions: 59 Slow queries: 0 Opens: 22 Flush tables: 1 Open tables: 16 Queries per second avg: 0.087
--------------
MariaDB Documentation has reference to an option --default-character-set=name.
An attempt to use --default-character-set=utf8mb4 on command line had no effect on behavior of insert/update record in terminal client.
mysql -u root -p --default-character-set=utf8mb4 youtube
....
MariaDB [youtube]> update episodes set title='Катя' where id=11;
'>
I highly recommend getting a copy of the freeware program HeidiSQL. It's not perfect and even crashes occasionally though compared to everything else I've worked with? Oh boy, totally worth my time.
Secondly you want to make sure that you're using the following:
Database Character Set: utf8mb4
Database Collation: utf8mb4_unicode_520_ci
These have the greatest UTF-8 support from what I've read from Stackoverflow member Rick James, via his website. He's a database superstar here on SO so if you ever hire him dump buckets of money on his face. His site has a comparison chart. In fact it's been a while and 520 might have been superseded since I last checked.
To set/change the Database Character Set you will need to change the my.cnf configuration file for MariaDB, I recommend using Notepad++ for code editing. This should make any newly created databases use the correct encoding however you may have to go through and manually update the character sets and collations for databases, tables and table columns so do not forget to be thorough!
[client]
default-character-set = utf8mb4
[mysqld]
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_520_ci
Once you do that your queries with Russian/Greek/etc should work normally as they do with English. Keyword: should.
Since I only speak two languages (English and bad English) I encode all characters past a certain Unicode numeric point just to be certain. It'll take up a bit more space however there are sometimes characters added for languages to Unicode after the majority of the language has been defined thus potentially fragmenting language support. If you're interested comment and I'll go find that code for you.
I'm at a moderate level of comprehension and I'm no Rick James though I have about two or three dozen translation pages (use the search feature and search for 'translation') on the site in my profile if you want to see the output. After I did these things I stopped having the data get corrupted. I hope this helps!

install moodle using Mariadb

befor installing moodle on ubuntu 16.04 server i have installed MariaDB and create a privilage like this :
# mysql -u root -p
MariaDB [(none)]> CREATE DATABASE moodle;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON moodle.* TO 'Admin'#'localhost' IDENTIFIED BY 'root';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q
after that i can with commande line access to moodle database with user: "Admin" and password:"root".
but in the install.php page of moodle if i give the user and password i got this error :
what is the problem please?
A bug in Moodle means it cannot detect the latest version of MariaDB database server used on all Ecenica Web Hosting packages and Managed Cloud Servers.
You can do the following:
Edit your Moodle config.php
Change $CFG->dbtype from mysqli to
mariadb
Save and Restart the installation of Moodle
It is an old post but, for someone who hits this page:
From the error it looks like the DB type selected in the screen prior to this was "MySQLi" instead of "MariaDb".

Oracle 11g XE installation on docker RHEL 7 image

While installing oracle 11g XE on docker i am getting the error.
Following are the output:-
/etc/init.d/oracle-xe configure
Oracle Database 11g Express Edition Configuration
This will configure on-boot properties of Oracle Database 11g Express
Edition. The following questions will determine whether the database should
be starting upon system boot, the ports it will use, and the passwords that
will be used for database accounts. Press to accept the defaults.
Ctrl-C will abort.
Specify the HTTP port that will be used for Oracle Application Express [8080]:8080
Specify a port that will be used for the database listener [1521]:1521
Specify a password to be used for database accounts. Note that the same
password will be used for SYS and SYSTEM. Oracle recommends the use of
different passwords for each database account. This can be done after
initial configuration:
Confirm the password:
Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:y
Starting Oracle Net Listener...Done
Configuring database...
Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details
[root#b7c63c4e1da8 Disk1]# cd /u01/app/oracle/product/11.2.0/xe/config/log
[root#b7c63c4e1da8 log]# ls
CloneRmanRestore.log cloneDBCreation.log postDBCreation.log postScripts.log
[root#b7c63c4e1da8 log]# cat CloneRmanRestore.log
ORA-00845: MEMORY_TARGET not supported on this system
select TO_CHAR(systimestamp,'YYYYMMDD HH:MI:SS') from dual
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
declare
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
select TO_CHAR(systimestamp,'YYYYMMDD HH:MI:SS') from dual
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
One of the possible solution that I got was to mount the temp file to provide extra space to it which only contains 6GB approx in the docker. But i am unable to mount the memory in docker.
Got the solution for the same :-
we have to modify the files init.ora and initXETemp.ora at the path /u01/app/oracle/product/11.2.0/xe/config/scripts
with the values :-
###########################################
# Miscellaneous
###########################################
compatible=11.2.0.0.0
diagnostic_dest=/u01/app/oracle
#memory_target=1073741824
pga_aggregate_target=200540160
sga_target=601620480
You may encounter
ORA-00845: MEMORY_TARGET not supported on this system
when starting Oracle DB in an unprivileged container. Try running the container with the --privileged flag, e.g.
docker run --name oracle12 --hostname oracledb --privileged local/oracle12:12.1.0.2

Resources