翻译:MariaDB DATABASE()

html { font-family: sans-serif }
body { margin: 0 }
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary { display: block }
audio,canvas,progress,video { display: inline-block; vertical-align: baseline }
audio:not([controls]) { display: none; height: 0 }
[hidden],template { display: none }
a { background: transparent }
a:active,a:hover { outline: 0 }
abbr[title] { border-bottom: 1px dotted }
b,strong { font-weight: bold }
dfn { font-style: italic }
h1 { font-size: 2em; margin: 0.67em 0 }
mark { background: #ff0; color: #000 }
small { font-size: 80% }
sub,sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline }
sup { top: -0.5em }
sub { bottom: -0.25em }
img { border: 0 }
svg:not(:root) { overflow: hidden }
figure { margin: 1em 40px }
hr { height: 0 }
pre { overflow: auto }
code,kbd,pre,samp { font-family: monospace, monospace; font-size: 1em }
button,input,optgroup,select,textarea { color: inherit; font: inherit; margin: 0 }
button { overflow: visible }
button,select { text-transform: none }
button,html input[type="button"],input[type="reset"],input[type="submit"] { cursor: pointer }
button[disabled],html input[disabled] { cursor: default }
button::-moz-focus-inner,
input::-moz-focus-inner { border: 0; padding: 0 }
input { line-height: normal }
input[type="checkbox"],input[type="radio"] { padding: 0 }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { height: auto }
input[type="search"] { }
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { }
fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em }
legend { border: 0; padding: 0 }
textarea { overflow: auto }
optgroup { font-weight: bold }
table { border-collapse: collapse; border-spacing: 0 }
td,th { padding: 0 }
* { }
*::before,*::after { }
html { font-size: 62.5% }
body { font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei", sans-serif; font-size: 14px; line-height: 1.42857143; color: #333333 }
input,button,select,textarea { font-family: inherit; font-size: inherit; line-height: inherit }
a { color: #428bca; text-decoration: none }
a:hover,a:focus { color: #2a6496; text-decoration: underline }
a:focus { outline: 5px auto -webkit-focus-ring-color }
figure { margin: 0 }
img { vertical-align: middle }
.hljs { display: block; padding: 0.5em; color: #333; background: #f8f8f8 }
.hljs-comment,.hljs-template_comment,.diff .hljs-header,.hljs-javadoc { color: #998; font-style: italic }
.hljs-keyword,.css .rule .hljs-keyword,.hljs-winutils,.javascript .hljs-title,.nginx .hljs-title,.hljs-subst,.hljs-request,.hljs-status { color: #333; font-weight: bold }
.hljs-number,.hljs-hexcolor,.ruby .hljs-constant { color: #099 }
.hljs-string,.hljs-tag .hljs-value,.hljs-phpdoc,.tex .hljs-formula { color: #d14 }
.hljs-title,.hljs-id,.coffeescript .hljs-params,.scss .hljs-preprocessor { color: #900; font-weight: bold }
.javascript .hljs-title,.lisp .hljs-title,.clojure .hljs-title,.hljs-subst { font-weight: normal }
.hljs-class .hljs-title,.haskell .hljs-type,.vhdl .hljs-literal,.tex .hljs-command { color: #458; font-weight: bold }
.hljs-tag,.hljs-tag .hljs-title,.hljs-rules .hljs-property,.django .hljs-tag .hljs-keyword { color: #000080; font-weight: normal }
.hljs-attribute,.hljs-variable,.lisp .hljs-body { color: #008080 }
.hljs-regexp { color: #009926 }
.hljs-symbol,.ruby .hljs-symbol .hljs-string,.lisp .hljs-keyword,.tex .hljs-special,.hljs-prompt { color: #990073 }
.hljs-built_in,.lisp .hljs-title,.clojure .hljs-built_in { color: #0086b3 }
.hljs-preprocessor,.hljs-pragma,.hljs-pi,.hljs-doctype,.hljs-shebang,.hljs-cdata { color: #999; font-weight: bold }
.hljs-deletion { background: #fdd }
.hljs-addition { background: #dfd }
.diff .hljs-change { background: #0086b3 }
.hljs-chunk { color: #aaa }
#container { padding: 15px }
pre { border: 1px solid #ccc; display: block; background-color: #f8f8f8 }
pre code { white-space: pre-wrap }
.hljs,code { font-family: Monaco, Menlo, Consolas, "Courier New", monospace }
:not(pre)>code { padding: 2px 4px; font-size: 90%; color: #c7254e; background-color: #f9f2f4; white-space: nowrap }

本文为mariadb官方手册:DATABASE的译文。

原文:https://mariadb.com/kb/en/library/database/
我提交到MariaDB官方手册的译文:https://mariadb.com/kb/zh-cn/database/

语法

DATABASE()

描述

以utf8 character set 格式的字符串返回默认(当前)的数据库名称。如果没有默认的数据库,则DATABASE()将返回NULL。在存储过程中,默认数据库是过程所关联的数据库,它可以和调用过程的上下文的默认数据库不同。

SCHEMA() 是 DATABASE()的同义词。

可以使用USE语句指定默认的数据库。另一种设置默认数据库的方式是在mysql命令行客户端启动时指定数据库的名称。

示例

MariaDB [(none)]> SELECT DATABASE();
+------------+
| DATABASE() |
+------------+
| NULL       |
+------------+

MariaDB [(none)]> USE test
Database changed

MariaDB [test]> SELECT DATABASE();
+------------+
| DATABASE() |
+------------+
| test       |
+------------+

回到Linux系列文章大纲:http://www.cnblogs.com/f-ck-need-u/p/7048359.html

回到数据库系列文章大纲:http://www.cnblogs.com/f-ck-need-u/p/7586194.html

转载请注明出处:http://www.cnblogs.com/f-ck-need-u/p/7598000.html

注:若您觉得这篇文章还不错请点击右下角推荐,您的支持能激发作者更大的写作热情,非常感谢!

时间: 2024-08-21 14:46:13

翻译:MariaDB DATABASE()的相关文章

Failed to start MariaDB database server. (已解决) 之前配过主从

[[email protected] /var/log/mariadb]# systemctl status mariadb.service● mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Mon

Install MariaDB on Ubuntu server

本文所描述的安装方法实用于一下软件环境 ,不能保证使用于其他版本,请参考自己实际情况调整安装方法及参数. 操作系统版本:Ubuntu Server 14.04 LTS 64bit 欲安装MariaDB版本:MariaDB 5.5.39 准备工作 确定安装版本以及安装文件 https://downloads.mariadb.org/ 用APT方式安装MariaDB 配置库并导入相应的key sudo apt-get install software-properties-common sudo a

41 mariadb日志文件、备份和恢复基础

01 mariadb日志文件 CentOS 7编译安装Mariadb [[email protected] ~]# yum -y groupinstall "Development Tools" [[email protected] ~]# yum install ncurses-devel openssl-devel libevent-devel jemalloc-devel cmake -y [[email protected] ~]# tar xf mariadb-5.5.53.

XAMPP转向MariaDB

在[1]<单表60亿记录等大数据场景的MySQL优化和运维之道>中给出了数据库版本选择: . MySQL社区版,用户群体最大 . MySQL企业版,收费 . Percona Server版,新特性多 . MariaDB版,国内用户不多 建议选择优先级为:MySQL社区版 > Percona Server > MariaDB > MySQL 企业版, 不过现在如果大家使用RDS服务,基本还以社区版为主. 但越来越多的开源社区正在放弃MySQL,而转向MariaDB,回顾一下:

linux下使用yum安装mariadb

测试环境系统版本: CentOS Linux release 7.3.1611 (Core) 1. 安装mariadb软件包 这个软件包包含了mariadb-server和一些工具包 [[email protected] conf.d]# yum groupinfo mariadb Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile   Group: MariaDB Database Server  G

安装LAMP服务器(Apache,MariaDB的,PHP)在CentOS / RHEL / Linux

Install LAMP Server (Apache, MariaDB, PHP) On CentOS/RHEL/Scientific Linux 7 By SK Share on Facebook Tweet on Twitter LAMP is a combination of operating system and open-source software stack. The acronym of LAMP is derived from first letters of Linux

关于运行mysql_install_db命令导致sudo systemctl start /restart mariadb.service启动失败问题

运行环境:centos 7 数据库:mariadb 问题描述:在yum安装mariadb数据库运行后运行了/var/lib/mysql_install_db命令,从而导致mariadb数据库启动或重启都失败. 故障解决: [[email protected] mysql]$ sudo systemctl start mariadb.service  Job for mariadb.service failed because the control process exited with err

在 CentOS 7(Linux)上安装MariaDB,搭建Mysql服务(Centos 7、mysql)

一.安装MariaDB 安装命令 yum -y install mariadb mariadb-server 安装完成MariaDB,首先启动MariaDB.然后查看服务启动状态 [[email protected] ~]# systemctl start mariadb [[email protected] ~]# systemctl status mariadb ● mariadb.service - MariaDB database server Loaded: loaded (/usr/

‘’数据库基础、MariaDB服务部署、库表基本管理、数据类型‘’经典案例

案例1:部署MariaDB服务器 案例2:使用mysql连接工具 案例3:库的基本操作 案例4:表格创建及查询 案例5:删除表 案例6:复制表 案例7:字符型字段应用 案例8:数值型字段应用 1 案例1:部署MariaDB服务器1.1 问题 本例要求在CentOS 7虚拟机上部署MariaDB数据库服务器,完成下列任务: 1)安装mariadb-server.mariadb软件包 2)启动mariadb服务,并设置开机自启,确认服务状态 3)将数据库管理用户 root 的密码设为 [email