using method 'mysql_native_password' failed with message
Posted 晓周的园子
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了using method 'mysql_native_password' failed with message相关的知识,希望对你有一定的参考价值。
- 错误消息:Connection open error . Authentication to host \'10.114.129.206\' for user \'root\' using method \'mysql_native_password\' failed with message: Reading from the stream has failed.DbType="MySql";ConfigId=""
- 解决方法:在连接字符串里添加:SslMode=None;
- 错误消息:Authentication to host \'10.114.129.206\' for user \'root\' using method \'mysql_native_password\' failed with message: Got timeout reading communication packetsDbType="MySql";ConfigId=""
- 解决方法:
<add name="ConnectionString" connectionString="server=10.xxx.xxx.xxx;port=3306;user id=root;password=xxxx;database=jyc;persistsecurityinfo=True;ConvertZeroDateTime=true;AllowUserVariables=True;SslMode=None;" providerName="MySql.Data.MySqlClient" xdt:Transform="Replace" xdt:Locator="Match(name)"/>
parse xml document using dom method
the bookstore.xml:
<?xml version="1.0" encoding="UTF-8"?>
<bookstore>
<book id="1">
<bookname>weicheng</bookname>
<author>qianzhongshu</author>
</book>
<book id="2" value="2_2">
<bookname>yidoudewunv</bookname>
<author>chuangduankangcheng</author>
</book>
<book id="3" class="3_3">
<bookname>a song of ice and fire</bookname>
<author>george martin</author>
</book>
</bookstore>
package com.user;
import java.io.IOException;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
public class Bookstore {
public static void main(String[] args) throws SAXException, IOException, ParserConfigurationException {
// TODO Auto-generated method stub
NodeList nodeList=DocumentBuilderFactory.newInstance().
newDocumentBuilder().parse("src/com/user/Bookstore.xml").getElementsByTagName("book");
System.out.println("There are "+nodeList.getLength()+" books");
for(int i=0;i<nodeList.getLength();i++){
System.out.println("======"+(i+1)+" ");
Node node=nodeList.item(i);
NamedNodeMap nameNodeMap=node.getAttributes();
NodeList childnodeList=node.getChildNodes();
for(int j=0;j<nameNodeMap.getLength();j++){
Node nodeMap=nameNodeMap.item(j);
System.out.println(nodeMap.getNodeName()+": "+nodeMap.getNodeValue());
}
for (int k=0;k<childnodeList.getLength();k++){
Node childNode=childnodeList.item(k);
if (childNode.getNodeType()==Node.ELEMENT_NODE){
System.out.println(childNode.getNodeName()+": "+childNode.getFirstChild().getNodeValue());
}
}
System.out.println(" "+(i+1)+"------");
}
}
}
run the java program:
以上是关于using method 'mysql_native_password' failed with message的主要内容,如果未能解决你的问题,请参考以下文章
android kotlin Gradle DSL method not found: '1.2.51()'错误,be using a version of the Android G
[Javascript] Automate the process of flattening deeply nested arrays using ES2019's flat method(
"undefined method `root' for nil:NilClass" error when using "pod install" 解决
踩坑记录-nuxt引入vuex报错store/index.js should export a method that returns a Vuex instance.