mysql的ERROR:1042
在虚拟机上测试数据库备份功能,需要连接外部机器上的mysql,pdo总是报超时错误!
起初认为是用的mysql账号的域不匹配!后来发现不是因为这个!
在终端中用mysql命令尝试连接,发现返回的错误是:
ERROR 1042 (HY000): Can’t get hostname for your address
网上搜了搜,真的找到了解决方法:
//解决办法:添加配置文件
[mysqld]
skip-name-resolve
不过这么设置后,以后连接这台机器上的mysql只能通过ip地址的形式。
mysql的ERROR:1042的更多相关文章
- 连接Mysql错误 error 1042 can't get hostname for your address
背景: 1.etc下的hosts文件有: 127.0.0.1 localhost 2.MySQL的my.ini配置文件: [mysqld] 节点下已经加入以下两行代码 skip-n ...
- mysql: Error Codes and Messages
Appendix B. Error Codes and MessagesTable of Contents B.1. Server Error Codes and MessagesB.2. Clien ...
- Discuz! X3搬家后UCenter出现UCenter info: MySQL Query Error解决方案
Discuz! X3 X2.5论坛搬家后 登录UCenter出现报错:UCenter info: MySQL Query ErrorSQL:SELECT value FROM [Table]vars ...
- Mysql update error: Error Code: 1175. You are using safe update mode and you tried to update a table
Mysql update error: Error Code: 1175. You are using safe update mode and you tried to update a table ...
- MySQL Replication Error 处理一例
故障现象 MySQL slave status详情 mysql> show slave status\G *************************** 1. row ********* ...
- mysql启动报错 mysql InnoDB: Error: could not open single-table tablespace file
mysql启动不成功,报错 mysql InnoDB: Error: could not open single-table tablespace file innodb_force_recovery ...
- xampp启动MySQL出现Error: MySQL shutdown unexpectedly.
20175227张雪莹 2018-2019-2 <Java程序设计> xampp启动MySQL出现Error: MySQL shutdown unexpectedly. 问题 本周在学习教 ...
- MySQL :: Fatal error: Can't change to run as user 'mysql'. Please check that the user exists!
Fatal error: Can't change to run as user 'mysql'. Please check that the user exists! MySQL :: Fatal ...
- MySQL错误ERROR 2002 (HY000): Can't connect to local MySQL server
From: http://www.jb51.net/article/56952.htm 这篇文章主要介绍了MySQL错误ERROR 2002 (HY000): Can't connect to loc ...
随机推荐
- 时间序列数据库选型——本质是列存储,B-tree索引,抑或是搜索引擎中的倒排索引
时间序列数据库最多,使用也最广泛.一般人们谈论时间序列数据库的时候指代的就是这一类存储.按照底层技术不同可以划分为三类. 直接基于文件的简单存储:RRD Tool,Graphite Whisper.这 ...
- UESTC 2016 Summer Training #6 Div.2
我好菜啊.. UVALive 6434 给出 n 个数,分成m组,每组的价值为最大值减去最小值,每组至少有1个,如果这一组只有一个数的话,价值为0 问 最小的价值是多少 dp[i][j] 表示将 前 ...
- weblogic部署ssh2应用出现异常
一般在domains\your_Domain\bin\startWebLogic.cmd 中找到set CLASSPATH=%CLASSPATH%;%MEDREC_WEBLOGIC_CLASSPATH ...
- Floyd 算法的动态规划本质
[转载自:http://www.cnblogs.com/chenying99/p/3932877.html] Floyd–Warshall(简称Floyd算法)是一种著名的解决任意两点间的最短路径(A ...
- priority_queue C++
三种优先队列定义方法:T_T 内部原理以后补..... priority_queue<int> qi;//普通的优先级队列,按从大到小排序 struct Node { friend boo ...
- CPU信息查询
cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l //查看CPU的个数 cat /proc/cpuinfo |grep ...
- Java 多线程中run() 与 start() 的不同
区别:调用start方法实现多线程,而调用run方法没有实现多线程 Start: 用start方法来启动线程,真正实现了多线程运行,这时无需等待run方法体代码执行完毕而直接继续执行下面的代码.通过调 ...
- uva 1210
#include<iostream> #include<cstring> using namespace std; + ; bool notprime[MAXN];//值为fa ...
- UVa 11426 - GCD - Extreme (II)
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&p ...
- Codeforces Round #257 (Div. 1) (Codeforces 449D)
思路:定义f(x)为 Ai & x==x 的个数,g(x)为x表示为二进制时1的个数,最后答案为 .为什么会等于这个呢:运用容斥的思想,如果 我们假设 ai&x==x 有f(x ...