localhost

SpringBoot属性配置

感情迁移 提交于 2019-12-03 20:40:59
SpringBoot属性配置   创建Spring Boot项目时,会默认生成一个全局配置文件application.properties(可以修改后缀为.yml),在src/main/resources目录下或者类路径的/config下。   我们可以通过修改该配置文件来对一些默认配置的配置值进行修改。 一、项目默认属性配置文件 1.修改tomcat端口号   spring boot 开发web应用的时候,默认tomcat的启动端口为8080,如果需要修改默认的端口,则需要在application.yml添加以下记录: server:   port: 8888   重启项目,启动日志可以看到:Tomcat started on port(s): 8888 (http) 启动端口为8888,   浏览器中访问 http://localhost:8888 能正常访问。 2.修改访问路径   spring boot 开发web应用的时候,访问路径为/,如果需要修改访问路径,则需要在application.yml添加以下记录: server: port: 8888 servlet: context-path: /springboot    重启项目,启动日志就可以看到:Tomcat started on port(s): 8888 (http) with context path '

What can i do about : Enter username and password for “” at http://localhost in Firefox browser?

蹲街弑〆低调 提交于 2019-12-03 20:30:17
Some times when i want to run and debug my asp.net projects and see it on Firefox browser, i see a window that ask me Username and Password for http://localhost IIS. I find this solution and think maybe is useful for others. So decide to share it with you. Open firefox and type in the address bar about:config type ntlm in the textbox. Double click on network.automatic-ntlm-auth.trusted-uris and type localhost there. Click on OK. You are done. Open firefox and type in the address bar about:config type ntlm in the textbox. Double click on network.automatic-ntlm-auth.trusted-uris and type

MySQL创建用户、授权、删除

♀尐吖头ヾ 提交于 2019-12-03 20:15:31
1、在MySQL中创建新用户 使用具有shell访问权限的root用户登录MySQL服务器并创建名为“rahul”的新用户。下面的命令只允许从localhost系统访问用户rahul的MySQL服务器。 1 mysql> CREATE USER 'rahul' @ 'localhost' IDENTIFIED BY 'password' ; 现在将权限分配给特定数据库。下面的命令将允许用户rahul拥有数据库“mydb”的所有权限。 1 mysql> GRANT ALL ON mydb.* TO 'rahul' @ 'localhost' ; 创建用户并分配适当的权限后,请确保重新加载权限。 1 mysql> FLUSH PRIVILEGES ; 2.创建可远程访问的MySQL用户 允许任何用户从远程系统连接MySQL服务器。您需要指定远程系统的主机名或IP地址。还可以使用%来允许任何主机 1 2 3 mysql> CREATE USER 'rahul' @ '123.45.67.89' IDENTIFIED BY 'password' ; mysql> CREATE USER 'rahul' @ '%' IDENTIFIED BY 'password' ; mysql> FLUSH PRIVILEGES ; 3、在MySQL中授予特定用户权限 下面是MySQL用户常用权限列表

.net core 修改网站启动端口

牧云@^-^@ 提交于 2019-12-03 20:11:33
https://blog.csdn.net/yenange/article/details/81675594 第 1 种方式:写死在代码 修改 Program.cs public static IWebHostBuilder CreateWebHostBuilder(string[] args) { var host = WebHost.CreateDefaultBuilder(args) .UseStartup<Startup>() .UseKestrel(o => { o.Listen(IPAddress.Loopback, 6000); }) ; return host; } 第 2 种方式:写死在代码 修改 Program.cs public static IWebHostBuilder CreateWebHostBuilder(string[] args) { var host = WebHost.CreateDefaultBuilder(args) .UseStartup<Startup>() .UseUrls("http://localhost:5002;https://localhost:5003") ; return host; } 第 3 种方式:配置json文件 1. 增加 host.json 文件,内容: { "urls": "http:/

xampp localhost phpmyadmin Access denied for user 'root'@'localhost' (using password: YES)

爷,独闯天下 提交于 2019-12-03 20:04:51
问题 I am getting two errors when I try to go to my phpmyadmin localhost Access denied for user 'root'@'localhost' (using password: YES) phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server. I don't know what I am doing wrong...here is my config code... $cfg['blowfish_secret'] = ''; /* YOU

启动redis本地服务

好久不见. 提交于 2019-12-03 19:58:03
首先是安装环境 windows版redis: https://github.com/MSOpenTech/redis/releases linux版redis: http://redis.io/download 我的电脑是windows版本接下来windows为例,现在我们的环境安装好了,接下来是要启动redis服务,启动要在两个dos界面输入命令,为了方便我将这两条命令做成批处理, start redis-server.exeredis.windows.conf start redis-cli.exe -h 127.0.0.1 -p 6379 将这两句话写入txt文件保存后,将文件后缀改为bat就可以直接启动(这个文件要放在下载回来的redis文件下) 前期准备工作已经完成,接下来可以了解redis是个什么东西了。简单的来说redis是一个分布式的(string,object)的一个map,可以用于信息之间的传递。下面是java和redis的使用。 public class RedisJava { public static void main(String[] args) { //连接本地redis服务(本地服务要先开呀) Jedis jedis=new Jedis( "localhost" ) ; System .out .println ( "连接成功" ) ; /

mysql初始化root密码和允许远程访问

隐身守侯 提交于 2019-12-03 19:53:27
1、初始化root密码 mysql默认root用户没有密码,输入mysql –u root 进入mysql mysql> update user set password = PASSWORD (‘123456’) where User = 'root' ; 2、允许mysql远程访问,可以使用以下三种方式: 1、改表法。 可能是你的帐号不允许 从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑, 登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%"   mysql -u root -pvmwaremysql>use mysql;   mysql>update user set host = '%' where user = 'r oot';   mysql>select host, user from user ; 2、授权法。例如,你想myuser使用mypassw ord从任何 主机连接到mysql服 务器的话。   GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%'IDENTIFIED BY 'mypassword' WI TH GRANT OPTION;   如果你想允许用户myuser从ip为192.168.1

Mysql:is not allowed to connect to this MySQL

假装没事ソ 提交于 2019-12-03 19:51:02
转自: http://blog.chinaunix.net/uid-27666459-id-4028596.html 如果你想连接你的mysql的时候发生这个错误: ERROR 1130: Host '192.168.1.3' is not allowed to connect to this MySQL server 解决方法: 1。 改表法。可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%" mysql -u root -pvmwaremysql>use mysql;mysql>update user set host = '%' where user = 'root';mysql>select host, user from user; 2. 授权法。例如,你想myuser使用mypassword从任何主机连接到mysql服务器的话。 GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION; 如果你想允许用户myuser从ip为192.168.1.3的主机连接到mysql服务器

linux虚拟机(centos7)常见配置解析

笑着哭i 提交于 2019-12-03 17:20:59
1. 场景描述 在win7下安装了多台虚拟机,安装后常用的几个配置记录下,因安全策略,采用的仅主机模式(内网)。 2. 解决方案 2.1.更改主机名称 (1)更改主机名称,不是连接的名称,是hostname中的名称,虚拟机版本是:cenos7中最新的7.7.1908。 (2)只需修改 /etc/hostname即可,如下: vi /etc/hostname 默认的local**修改为需要的机器名称,例如本机修改为w158 (3)root用户下执行reboot就会生效。 2.2 关闭防火墙 centos7与linux下的不太一样,没有iptables。 systemctl status firewalld.service #软件老王,查看防火墙状态 systemctl stop firewalld.service #软件老王,停止firewall systemctl disable firewalld.service #软件老王,禁止firewall开机启动 2.3 secureCRT连接虚拟机慢 vi /etc/ssh/sshd_config 修改:UseDNS yes,为:UseDNS no 重启ssh: systemctl restart sshd 2.4 无网状态下安装zip与unzip 下载地址: http://www.rpmfind.net/linux/rpm2html

js的ajax请求

流过昼夜 提交于 2019-12-03 16:59:20
1 js原生get请求 <script> window.onload = function(){ var oBtn = document.getElementById('btn'); oBtn.onclick = function(){ let xhttp = new XMLHttpRequest(); xhttp.open('get','http://localhost:3000/users'); xhttp.send(); xhttp.onreadystatechange = function(){ if(xhttp.readyState == 4){//readyState 服务器响应的状态编码 console.log(JSON.parse(xhttp.response)); } } } } </script> get 2 js原生post请求 <script> window.onload = function(){ var oBtn = document.getElementById('btn'); var obj = { "name":"zxq", "age":123 } oBtn.onclick = function getData(){ var xhttp = new XMLHttpRequest(); xhttp.open('post','http:/