随笔分类 - database
摘要:navicat 连接docker mysql 2059 - Authentication plugin 'caching_sha2_password' cannot be loaded: .... 剑灵尊 2018-12-16 18:13:16 1077 收藏 4 分类专栏: docker 版权 d
阅读全文
摘要:mysql CREATE DATABASE IF NOT EXISTS my_db default charset utf8 COLLATE utf8_general_ci; grant all privileges on weixin.* to 'weixin'@'localhost' ident
阅读全文
摘要:MySQL 获得当前日期时间 函数 获得当前日期+时间(date + time)函数:now() mysql> select now(); + + | now() | + + | 2008-08-08 22:20:46 | + + 获得当前日期+时间(date + time)函数:sysdate()
阅读全文
摘要:~]# systemctl start mysql.service 要启动MySQL数据库是却是这样的提示 Failed to start mysqld.service: Unit not found 解决方法如下: 首先需要安装mariadb-server ~]# yum install -y m
阅读全文
摘要:一、下载完安装包,并解压 tgz(以下演示的是 64 位 Linux上的安装) 。 二、MongoDB 的可执行文件位于 bin 目录下,所以可以将其添加到 PATH 路径中: 为 MongoDB 的安装路径。如本文的 /usr/local/mongodb 。 三、创建数据库目录 MongoDB的数
阅读全文
摘要:// 欄位字串為$querys = array("name"=>"shian");// 數值等於多少$querys = array("number"=>7);// 數值大於多少$querys = array("number"=>array('$gt' => 5));// 數值大於等於多少$query
阅读全文
摘要:$mongo = new Mongo(); $db = $mongo->selectDB('test'); $collection = $db->selectCollection('foo'); //插入 $array = array('name'=>'张三','sex'=>'male'); $bo
阅读全文
摘要:mongodb数据库维护离不开必要的备份、恢复操作,而且一般不会出错,所以我们在使用的时候大部分时候使用备份和恢复操作就可以了 mongodump.exe备份的原理是通过一次查询获取当前服务器快照,并将快照写入磁盘中,因此这种方式保存的也不是实时的,因为在获取快照后,服务器还会有数据写入,为了保证备
阅读全文