host

mysql 远程连接权限

时光总嘲笑我的痴心妄想 提交于 2019-12-24 10:51:02
远程连接MYSQL提示Host is not allowed to connect to this MySQL server 2014年05月05日 17:51:03 阅读数:31892 如果你想连接你的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;

Fetching operations from Ncache server is taking time than previously

放肆的年华 提交于 2019-12-24 08:31:29
问题 In my office, we have a server that has Ncache installed for storing and retrieving data and our applications are also hosted there. There was an issue where application was getting timed out. In depth, i found that getting cache method from Ncache is taking 8-9 seconds, which was previously taking 0.5 seconds. The application isn't changed recently and it was working fine previously. All of a sudden this issue has occurred. Some one told me that there was an issue where all of a sudden all

PHP download entire folder (recursive) via FTP

流过昼夜 提交于 2019-12-24 05:12:34
问题 I currently have a very large site approximately 5gb in size with 60,000 files. The current host isn't doing much in the way of helping me transfer the site to the new host and what I was thinking was to make a simply script on my new host to FTP into the old host and download the entire public_html folder (recursively) to the new server. Is this possible and if so, does anyone have any links they could share to aid in this? Much appreciated. 回答1: There are probably better mechanisms to do

PHP download entire folder (recursive) via FTP

☆樱花仙子☆ 提交于 2019-12-24 05:12:06
问题 I currently have a very large site approximately 5gb in size with 60,000 files. The current host isn't doing much in the way of helping me transfer the site to the new host and what I was thinking was to make a simply script on my new host to FTP into the old host and download the entire public_html folder (recursively) to the new server. Is this possible and if so, does anyone have any links they could share to aid in this? Much appreciated. 回答1: There are probably better mechanisms to do

Centos7 下安装mysql

一笑奈何 提交于 2019-12-24 02:25:18
1.linux环境下安装mysql 参考连接:https://blog.csdn.net/wohiusdashi/article/details/89358071 2.修改host匹配方式,用于支持远程连接 完成上述操作后,远程连接会报错误: 【1130 - Host XXX is not allowed to connect to this MySQL server】 解决方案:将Host修改为通配符 use mysql; update user set host = ‘%’ where user =‘root’; 之后刷新下配置: flush privileges; 来源: CSDN 作者: hwf13246837704 链接: https://blog.csdn.net/hwf13246837704/article/details/103672170

docker监控weavworks/scope,单台和多台部署

南笙酒味 提交于 2019-12-24 00:14:16
单台: 需要用到sysdig.tar 包,可从网上下载 我用的本地包: 将它做成镜像: [root@localhost ~]# docker load < sysdig.tar 运行这个镜像: [root@localhost ~]# docker run -it --rm --name sysdig --privileged=true --volume=/var/run/docker.sock:/host/var/run/docker.sock --volume=/dev:/host/dev --volume=/proc:/host/proc:ro --volume=/boot:/host/boot:ro --volume=/lib/modules:/host/lib/modules:ro --volume=/usr:/host/usr:ro sysdig/sysdig 下载scope: [root@localhost ~]# curl -L git.io/scope -o /usr/local/bin/scope 给个权限: [root@localhost ~]# chmod +x /usr/local/bin/scope 启动: scope launch 浏览器访问: ip地址加端口4040: 多台: 第二台docker操作: [root@localhost ~]# curl

Docker的监控(简单部署Sysdig和Weave Scope)

时光毁灭记忆、已成空白 提交于 2019-12-23 23:56:06
一、Docker的监控 Docker自带的监控命令 简单命令介绍 ps docker container ps 是我们早已熟悉的命令了,方便我们查看当前运行的容器。新版的 Docker 提供了一个新命令 docker container ls,其作用和用法与 docker container ps 完全一样。不过 ls 含义可能比 ps 更准确,所以更推荐使用。 top 如果想知道某个容器中运行了哪些进程,可以执行 docker container top [container] 命令。命令后面还可以跟上 Linux 操作系统 ps 命令的参数显示特定的信息,比如 -au。 stats docker container stats 用于显示每个容器各种资源的使用情况。默认会显示一个实时变化的列表,展示每个容器的 CPU 使用率,内存使用量和可用量。注意:容器启动时如果没有特别指定内存 limit,stats 命令会显示 host 的内存总量,但这并不意味着每个 container 都能使用到这么多的内存。 除此之外 docker container stats 命令还会显示容器网络和磁盘的 IO 数据。默认的输出有个缺点,显示的是容器 ID 而非名字。我们可以在 stats 命令后面指定容器的名称只显示某些容器的数据。比如 docker container stats sysdig

rsync远程同步和时间同步

倖福魔咒の 提交于 2019-12-23 22:06:48
1、基本语法 rsync -rvl $pdir/$fname $user@hadoop$host:$pdir/$fname 2、xsync集群分发脚本 touch xsync.sh vim xsync.sh #!/bin/bash # $#:表示传递给脚本或函数的参数个数。 #1 获取输入参数个数,如果没有参数,直接退出 pcount=$# if((pcount==0)); then echo no args; exit; fi #2 获取文件名称 p1=$1 fname=`basename $p1` echo fname=$fname #3 获取上级目录到绝对路径 pdir=`cd -P $(dirname $p1); pwd` echo pdir=$pdir #4 获取当前用户名称 user=`whoami` #5 循环 #for((host=0; host<5; host++)); do #echo $pdir/$fname $user@hadoop$host:$pdir # echo --------------- hadoop$host ---------------- # rsync -rvl $pdir/$fname $user@192.168.3.15$host:$pdir #done #5 循环 for host in {master,slaver1

Alibaba Cloud Toolkit

自作多情 提交于 2019-12-23 22:03:40
插件安装 1、确保 IntelliJ 、PyCharm、PhpStorm等在 2018.1 或更高版本,本文以 IntelliJ 为例(我的版本是2018.3) 2、打开 Intellij 的 Settings ,进入 Plugins 选项,搜索Alibaba Cloud Toolkit插件安装即刻。 如图: 3、安装成功以后需要重启才能生效,可以看见如下图标就是安装成功了。 4、我使用的是阿里云服务器,做个简单例子,操作简单基本相同,未见什么大坑。 5、找到Host,打开terminal窗口(添加host成功以后点下搜索,有时候自动刷新不出来)。 6、一键部署( 来源: CSDN 作者: wzc_ss 链接: https://blog.csdn.net/wzc_ss/article/details/100701458

Spring boot 工具类静态属性注入及多环境配置

末鹿安然 提交于 2019-12-23 21:37:21
由于需要访问MongoDB,但是本地开发环境不能直接连接MongoDB,需要通过SecureCRT使用127.0.0.2本地IP代理。但是程序部署到线上生产环境后,是可以直接访问MongoDB的,因此开发好程序后,总是要修改一下MongoDB服务器的IP才能提交代码,这样很是不方便。 private static final String PUBCHAT_HOST = "127.0.0.2"; // private static final String PUBCHAT_HOST = "PROD_MONGO_SERVER_IP"; 由于没有使用spring-boot自带的 spring-boot-starter-data-mongodb ,而是使用 mongo-java-driver 访问MongoDB,因此在程序中需要定义一些访问MongoDB的配置,比如服务器地址、IP端口、数据库名……使用一个工具类的静态变量声明这些配置信息,配置信息的值保存在application.yml 配置文件中。通过 @ConfigurationProperties 注入。 静态工具类定义 属性是静态的: private static String chat_username; 然后通过非静态的 set方法注入: @Value("${mongo.config.username}") public