- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
下面是来自全新安装的 MySQL 5 的查询select host, user from mysql.user
的结果。
+-----------+------------------+
| host | user |
+-----------+------------------+
| 127.0.0.1 | root |
| localhost | debian-sys-maint |
| localhost | root |
| ubuntu | root |
+-----------+------------------+
127.0.0.1
、localhost
、ubuntu
都指向同一台机器,也就是 native 。从表中删除看似重复的主机/用户对的行后,我找不到任何区别。
它们之间有什么区别?我可以安全地移除另外两个吗?
最佳答案
来自 the manual :
When you install MySQL, the grant tables are populated with an initial set of accounts. The names and access privileges for these accounts are described in Section 2.10.3, “Securing the Initial MySQL Accounts”, which also discusses how to assign passwords to them.
Some accounts have the user name root. These are superuser accounts that have all privileges and can do anything. The initial root account passwords are empty, so anyone can connect to the MySQL server as root without a password and be granted all privileges.
On Unix, each root account permits connections from the local host. Connections can be made by specifying a host name of localhost or the actual host name or IP address.
但是,我找不到任何理由。手册中没有其他内容表明出于任何特定原因需要,但大概是为了涵盖 request verification 的所有基础。 .在某些情况下,一个发起本地连接使用一个帐户而其他人需要使用其他帐户;我猜想确保本地 root 访问将始终有效,无论在什么边缘情况下,都是一件好事。
关于mysql - mysql.user 表中的 127.0.0.1、localhost、[hostname] 有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7644704/
无法启动 hostname.service:单元 hostname.service 被屏蔽。 这发生在主机名更新之后,尝试执行 sudo 服务主机名启动。 最佳答案 在运行 service hostn
我基于vmware搭建hadoop集群,使用sbin/start-dfs.sh命令,遇到ssh问题。它说, ssh: Could not resolve hostname now.: No addre
我在两个 AWS EC2 实例上运行的集群环境中运行 Airflow。一份给主人,一份给 worker 。工作节点在运行“$airflow worker”时会定期抛出此错误: [2018-08-09
我现在正在设置新的 SuSE Linux Enterprise 12 服务器。有人可以解释一下,/etc/hostname 和 yast2 > 主机名之间有什么区别?两者似乎都有不同的内容,一个地方的
我正在尝试使用 Go SDK 将文件上传到 Amazon S3 存储桶到自定义终端节点,但我收到了该错误: RequestError: send request failed caused by: P
从 cloud.mongodb 处理 URI 后,我尝试通过 compass 进行连接(1.15.1) 在 Windows 10 上,但我收到这个奇怪的错误: No hostname or hostn
我尝试部署了一个测试hadoop集群环境。当我启动它时,所有日志都正确,但是无法运行任何hadoop命令,我发现9000端口没有被监听。 运行hadoop命令(ERROR,所有命令都是一样的错误):
在 Linux 上启动为 Apache Solr 4.x 配置的 tomcat6 服务时,如果有人可以帮助解决在 catalina.out 中记录的这个问题,我将不胜感激: Mar 22, 2014
我有一个本地网络,上面有几台 PC 和专用 Controller 。这些专用 Controller 必须配置静态 IP 地址,并且不具备 DHCP 功能。 我被要求将设备主机名和 IP 地址的列表放在
我正在使用 puppet 来配置服务器。我想在 *.erb 模板中打印当前机器(节点)名称。有主机名变量,但这包含 puppetmaster 主机名。是否有关于此主题的任何好的引用/列表? 最佳答案
我对这些概念 super 陌生,如果这很愚蠢,我深表歉意。我正在尝试使用Elasticsearch数据源在Grafana上可视化Metricbeat数据,这些数据源均在本地运行,但无法找到Metric
假设我有一个具有以下属性的虚拟机 FQDN :trialinstance.westus.cloudapp.azure.com Public IP : XXX.XXX.XXX.XXX Private I
假设我有一个具有以下属性的虚拟机 FQDN :trialinstance.westus.cloudapp.azure.com Public IP : XXX.XXX.XXX.XXX Private I
在 CLI Linux 中我运行: echo $HOSTNAME 并接收: alex-HP-295-G1-SFF-Business-PC 我尝试在java中获取这个环境 ExpressionPa
如果我回显一个包含 $(hostname) 命令的字符串,那么它工作正常。例如,在终端中运行: echo "http://$(hostname)/main.html" http://artur/mai
我想写一个C++代码来获取所有主机名的完整信息,以及已添加到域控制的计算机的IP地址和子网掩码。 最佳答案 gethostname 会给你当前主机的名字 gethostbyname 查找具有特定名称的
在 CLI 模式下 getenv('HOSTNAME') 正确返回 HOSTNAME 环境变量,但在脚本中调用时返回 FALSE。 为什么?如何在脚本中获取 HOSTNAME 变量? 最佳答案 HOS
本文是关于Linux操作系统主机名(hostname)的文档,对主要配置文件/etc/hosts进行简要的说明 ;另外对基配具工具hostname也进行了举例说明; 欢迎高手斧正,谢谢; 目录
需要修改两处:一处是/etc/sysconfig/network,另一处是/etc/hosts,只修改任一处会导致系统启动异常。首先切换到root用户。 复制代码
使用Win7,Gitolite和TortoiseGIT 今天,我将GIT更新为2.6.1版,因此必须卸载旧版本。 很久以前,我创建了一个ssh-config文件,以更轻松地访问我的存储库,并且从今天开
我是一名优秀的程序员,十分优秀!