String de Conexão MySQL
MySQL Connector/Net
Type: .NET Framework Class Library
Usage: MySql.Data.MySqlClient.MySqlConnection
Standard
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Specifying port
Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Named pipes
Server=myServerAddress;Port=-1;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Using encryption
This one activates SSL encryption for all data sent between the client and server. The server needs to have a certificate installed.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword; Encryption=true;
Specifying network protocol
Use this one to specify which network protocol to use for the connection.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword; Protocol=socket;
.NET Framework Data Provider for OLE DB
Type: .NET Framework Wrapper Class Library
Usage: System.Data.OleDb.OleDbConnection
Usage: System.Data.OleDb.OleDbConnection
Bridging to MySQL OLEDB
This is just one connection string sample for the wrapping OleDbConnection class that calls the underlying OLEDB provider. See respective OLE DB provider for more connection strings to use with this class.
Provider=MySQLProv;Data Source=mydb;User Id=myUsername;Password=myPassword;
Comentários
Postar um comentário