简体   繁体   English

Mysql连接的连接字符串

[英]Connection String for Mysql Connection

I have following settings for mysql Database: 我对mysql数据库有以下设置:

在此处输入图片说明

I have made connection string as: 我已将连接字符串设置为:

server=localhost;database=Ink_ProductionJob;Port=3306;username=root;password=''

Code: 码:

connection = New MySqlConnection(ConfigurationSettings.AppSettings("ConnSQLString"))
connection.Open()

But Gives me error: 但是给我错误:

Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message: Unknown database 'ink_productionjob'

Plese help me whats wrong in this. 请帮我解决这个问题。

First time establishing MySql and .NET connection. 第一次建立MySql和.NET连接。

Plz Help. 请帮助。

在此处输入图片说明

The unknown database error typically means that you are specifying a database that doesn't exist. 未知数据库错误通常意味着您指定的数据库不存在。 Are you sure that the database name (not the table you need) is ink_productionjob ? 您确定数据库名称(而不是所需的表)是ink_productionjob吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM