localhost

必备Mysql命令

百般思念 提交于 2020-02-15 22:25:12
文章来源:https://macrozheng.github.io/mall-learning/#/reference/mysql 开发者必备Mysql命令 开发者必备Mysql常用命令,涵盖了数据定义语句、数据操纵语句及数据控制语句,基于Mysql5.7。 数据定义语句(DDL) 数据库操作 登录数据库: mysql -uroot -proot 创建数据库: create database test 查看所有数据库: show databases 选择数据库并使用: use test 查看所有数据表: show tables 删除数据库: drop database test 表操作 创建表: create table emp(ename varchar(10),hiredate date,sal decimal(10,2),deptno int(2)) create table dept(deptno int(2),deptname varchar(10)) 查看表的定义: desc emp 查看表定义(详细): show create table emp \G 删除表: drop table emp 修改表字段: alter table emp modify ename varchar(20) 添加表字段: alter table emp add column age int

JDBC各种数据库连接方式

若如初见. 提交于 2020-02-15 06:47:22
1)连接Oracle 8/8i/9i/10g/11g(thin模式) Class.forName("oracle.JDBC.driver.OracleDriver").newInstance(); String url="JDBC:oracle:thin:@localhost:1521:orcl" //orcl为Oracle数据库的SID String user="test"; String password="test"; Connection con=DriverManager.getConnection(url,user,password); 2)连接DB2数据库 Class.forName("com.ibm.db2.jcc.DB2Driver"); String url="JDBC:db2://localhost:5000/testDb"; String user="test"; String password="test"; Connection con=DriverManager.getConnection(url,user,password); 3)连接MySQL数据库 Class.forName("com.mysql.jdbc.Driver"); String url="JDBC:mysql://localhost:8080/testDB"; String user

docker下的mysql远程连接

五迷三道 提交于 2020-02-15 00:54:30
docker下的mysql8.0的一个奇怪的地方 早上给用docker给装mysql(lastest版本)的时候发现了一个奇怪的现象 如果有 还是先说说坑吧 刚装完的mysql是不给远程连接的,这个问题好解决网上搜一搜,答案就出来了,然而~ 关于授权的命令有很多版本,如下… #授权 GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "rw"; flush privileges; 1) grant all privileges on *.* to 'root'@'%' # 给用于授予权限      GRANT ALL PRIVILEGES ON *.* ‘root’@’%’ identified by ‘123123’ WITH GRANT OPTION; 这是网上流传较多的写法。实际上会报错的。   2) flush privileges # 刷新权限 等等等等,诸如此类。 我全是试过去了,还是不行,连不上去。 于是我就想着最粗暴的方法——直接改User 表 mysql> desc user ; +--------------------------+-----------------------------------+------+-----+-----------------------+-------+ |

.net core 整洁架构入门

微笑、不失礼 提交于 2020-02-15 00:20:28
Clean Architecture with .NET Core: Getting Started # 使用.NET Core整洁架构(Clean Architecture):入门 Over the past two years, I’ve travelled the world teaching programmers how to build enterprise applications using Clean Architecture with .NET Core. I started by providing a sample solution using the iconic Northwind Traders database. Recently, I’ve developed a new Clean Architecture Solution Template for .NET Core. 在过去的两年中,我走遍世界,教程序员如何使用带有.NET Core的整洁架构来构建企业应用程序。我首先使用标志性的Northwind Traders数据库提供了示例解决方案。最近,我为.NET Core开发了一个新的整洁架构解决方案模板。 This post provides an overview of Clean Architecture and introduces

DNS域名服务

梦想的初衷 提交于 2020-02-14 23:09:18
DNS域名服务 域名系统dns服务 DNS: 名字解析服务,将名称解析为ip地址 dns端口号: 53/tcp 53/udp 本地名称解析文件 : /etc/hosts 文件,优先级高于dns 默认dns解析服务器文件 : /etc/resolv.conf dns主配置文件: /etc/named.conf dns数据解析库文件: /var/named/*.zone 语法检查 主配置文件语法检查 :named-checkconf 解析库配置文件语法检查:maned-checkzone ssy.org /var/named/ssy.org 配置文件生效:systemctl reload named DNS域名分布式结构 例: www.google.com. = 主机名+域名 根域: . 解析com. 顶级域: com,org 解析google 二级域: google, baidu 解析www 主机名: www,stady DNS相关工具 软件: 服务器端 bind 客户端 bind-utils rndc 命令: reload 生效dns配置文件 flush 清空dns缓存 dig 解析测试工具: dig www.ssy.com @10.0.0.137 指定137主机解析名称 -x 反向解析 host 解析测试工具: host www.ssy.org 10.0.0.137 curl

Nginx作为静态内容服务器(Windows环境)

99封情书 提交于 2020-02-14 20:58:33
1、简单安装   1)下载 http://nginx.org/en/download.html   2)解压后的路径 E:\Study\nginx\nginx-1.7.6   3)执行nginx.exe,访问http://localhost ,出现Welcome to nginx!欢迎内容,安装成功。   4)在安装路径的logs目录下,会自动生成一个nginx.pid文件,文件内容就是nginx的主进程pid。 2、简单使用命令 nginx -s stop 快速停止 nginx -s quit 安全退出(会处理完正在进行的请求) nginx -s reload 修改了nginx的配置文件后执行该命令生效 nginx -s reopen 重打开日志文件 3、静态内容服务器   访问html文件时,让nginx映射到/data/html路径下;访问图片文件时,让nginx映射到/data/image路径下。   1)创建data目录,然后在data目录下分别插件html目录和image目录。   2)在html目录中放入index.html、hello.html文件   3)在image目录中放入1.jpg、2.jpg两张图片   4)配置nginx.conf     在http节点内的server节点中进行配置。 location / { #指定根目录 root E:/Study

nginx发布静态资源

会有一股神秘感。 提交于 2020-02-14 20:56:44
nginx发布静态资源 名词 server location root alias 参考 Beginner's Guide http://nginx.org/en/docs/http/ngx_http_core_module.html#location http://nginx.org/en/docs/http/ngx_http_core_module.html#root http://nginx.org/en/docs/http/ngx_http_core_module.html#alias ngx_http_index_module index指令 ngx_http_core_module http指令 location指令 listen指令 root指令 server指令 server_name指令 Nginx之坑:完全理解location中的index,配置网站初始页 https://blog.csdn.net/qq_32331073/article/details/81945134 配置静态资源服务 http://www.mozq.com:9001/= > d:/00/00 目录下的资源 访问流程分析: 请求地址 http://www.mozq.com:9001/static/ DNS解析请求域名www.mozq.com得到请求主机ip

mysql基本操作

两盒软妹~` 提交于 2020-02-13 11:01:47
对用户授权的操作 grant 权限 on 数据库名.表名 to 用户名@’可以访问的地址’ identified by “密码” 权限: all 所有权限 usage 无权限 select,update,insert,delete,等权限 数据库.表名:   *.*   所有数据库的所有表         数据库名.*  单个数据库的所有表        数据库名.表名   单个数据库的某个表 用户名: 授权的用户名 可以访问的地址:% 所有地址,但是localhost不能访问     localhost  只有localhost可以访问      192.168.1.0/24  可以访问网段地址      192.168.1.1  只能某个地址访问 flush privileges; 刷新授权 操作 给bigdata用户授予在localhost登录,对mysql数据库进行create,select,update,insert,delete操作,但是不设置密码就可以登陆 12 mysql> grant create,select,update,insert,delete on mysql.* to bigdata@'localhost';mysql> flush privileges; 登录数据库查看权限: 1 mysql>show grants; 大专栏 mysql基本操作 >

Ssh代理详解 【转载】

…衆ロ難τιáo~ 提交于 2020-02-13 07:43:22
原文: http://www.cnblogs.com/wangkangluo1/archive/2011/06/29/2093727.html ssh 代理详细解释 ssh -qTfnN -D 7070 ape@192.168.1.35 ssh -CfNg -R 1521:127.0.0.1:80 ape@192.168.1.35 参考地址: http://hi.baidu.com/step_1/blog/item/271f831bfbc198f1ae5133b7.html http://hi.baidu.com/deyu260/blog/item/3be433093e5779a12eddd418.html http://hi.baidu.com/laowuuser/blog/item/317647c7992a65de38db4946.html 参考文档: 1. SSH: Port Forwarding 1 .正向隧道 - 隧道监听本地port,为普通活动提供安全连接 ssh - qTfnN - L port:host:hostport - l user remote_ip 2 .反向隧道 ---- 隧道监听远程port,突破防火墙提供服务 ssh - qTfnN - R port:host:hostport - l user remote_ip 3 .socks代理 SSH -

Google API - How to redirect URL to my localhost

别等时光非礼了梦想. 提交于 2020-02-13 03:02:07
问题 I am working on integrating google login in my Phonegap app using Google OAuth. What happens is that while creating a client ID for my app, I have to choose "Installed Application" and then the application type as "Others" since I am creating my app using Phonegap. This gives me two redirect URIs such as " urn:ietf:wg:oauth:2.0:oob " and " http://localhost ". I am not opting to go with " urn:ietf:wg:oauth:2.0:oob " as it requires the user to copy the code and put it back to the app. The other