database

MariaDB Create Database

Written by  on Oktober 23, 2019

Eine Datenbank anlegen geht ganz einfach

MariaDB [(none)]> create database db1;
Query OK, 1 row affected (0.001 sec)

Außer es soll ein Bindestrich im Datenbanknamen vorkommen

MariaDB [(none)]> create database db-1;
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 '-1' at line 1

Vielleicht helfen Anführungszeichen

MariaDB [(none)]> create database "db-1";
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 '"db-1"' at line 1

Oder einfache Hochkommata

MariaDB [(none)]> create database 'db-1';
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 ''db-1' at line 1

Oder mit einem Schrägstrich quotieren

MariaDB [(none)]> create database 'db\-1';
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 ''db\-'' at line 1

Oder so was

MariaDB [(none)]> create database ´db-1´;
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 '-1´' t line 1

Nein, es müssen Backticks sein

MariaDB [(none)]> create database `db-1`;
Query OK, 1 row affected (0.001 sec)

Ist doch logisch!?

Zitat des Tages

Written by  on Juli 19, 2015

A lot of your work is done behind the scenes. In fact, people will often wonder what it is you do all day, since much of your work is never actually seen by the end users.

DBA Survivor: Become a Rock Star DBA

Zitat des Tages

Written by  on Juli 18, 2015

Und nochmal über Entwickler und Administratoren:

Unfortunately these two groups rarely interface unless there is a problem (or an opportunity to point fingers at each other).

DBA Survivor: Become a Rock Star DBA

Zitat des Tages

Written by  on Juli 17, 2015

Developers know code, and they know various facets of the business; and because they focus on those items daily, they are not spending time racking servers, installing routers, replacing hard disks, allocating space on the SAN, and so forth. Server administrators do those things, but they do not know how to code or build applications that will drive the business forward at the same speed as a developer.

DBA Survivor: Become a Rock Star DBA

Zitat des Tages

Written by  on Juli 5, 2015

Gilt auch für andere Fachbereiche 🙂

If you come across a developer that believes they know more than anyone else in the room, you can sit back and chuckle because you already know that the DBAs are the smartest, otherwise you wouldn’t always be called to fix their problems all day long.

DBA Survivor: Become a Rock Star DBA

Zitat des Tages

Written by  on Juni 28, 2015

Some might see it as “dumb luck,” but I prefer the term “smart luck.”

DBA Survivor: Become a Rock Star DBA

Zitat des Tages

Written by  on Juni 26, 2015

With that responsibility, you will also find that you start getting more blame than credit for your work. I promise you this: no one will ever stop by your desk in the morning and thank you for the fact that everything ran smoothly last night.

DBA Survivor: Become a Rock Star DBA