eupolicy.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
This Mastodon server is a friendly and respectful discussion space for people working in areas related to EU policy. When you request to create an account, please tell us something about you.

Server stats:

221
active users

#mysql

1 post1 participant0 posts today

I've used #MySQL before (last time was 2016, I think), but today I'm mostly onto #Postgres (and sometimes, #SQLite). I know PG is superior to MySQL is pretty much all aspect I could think of, but still, it seems that MySQL still has a quite big user base.

What's the catch? What am I missing here? Why would someone use MySQL over Postgres to build smt since Postgres [apparently] is better than MySQL in every single possible aspect?

It's a honest question. Please help me understand it – and perhaps, consider modern MySQL/MariaDB in next projects. :)

TIL: The MySQL Docker image restarts the server after the initial data import, which means if you have enabled the query log using an SQL query it gets reset to being disabled.

If you enable the query log in the config file, this logs every query of the import.

So you have to:

1. Enable in config.
2. Disable using query before import.
3. When the server is restarted, the query log will be enabled.

Better experience and fast, secure way to create a connection with MariaDB.

// Config.php

$mariadb = ini_get('pdo_mysql.default_socket');

$pdo = new PDO("mysql:unix_socket=$mariadb;dbname=test", 'root', '');

if($pdo){
echo "Database connection success!";
}

#php#mariadb#pdo

Aktuell laufen in der Oracle University zwei Event an denen man kostenlos sein Wissen rund um Cloud, Datenbanken, DevOps aufbessern kann. Außerdem kann man kostenlose Voucher für Zertifizierungen erhalten.

Zum einen veranstaltet #Oracle erneut das Race To Certification-Event (bis Ende Oktober) und zum anderen findet im Rahmen des 30. Jubiläums von #MySQL ein ähnliches Event mit Kursen und Zertifikaten statt (bis Ende Juli)

education.oracle.com/race-to-c

education.oracle.com/mysql-pro

TIL: MySQL has a BIT(M) data type, which can store M bits of data. However, if you try to be 'clever' and use it as a boolean column, you can't insert something like 0, you have to explicitly convert it with b'0'.

I don't know why anyone would use BIT(1) (as the codebase I'm working on today does), because it still consumes 1 byte, which is the same as TINYINT and that doesn't require conversions.

(before anyone slags off MySQL, other database engines support BIT as well)