Skip to main content

All Questions

Filter by
Sorted by
Tagged with
130 votes
14 answers
475k views

What is the MySQL JDBC driver connection string?

I am new to JDBC and I am trying to make a connection to a MySQL database. I am using Connector/J driver, but I cant find the JDBC connection string for my Class.forName() method.
user avatar
29 votes
6 answers
43k views

how to use `charset` and `encoding` in `create_engine` of SQLAlchemy (to create pandas dataframe)?

I am very confused with the way charset and encoding work in SQLAlchemy. I understand (and have read) the difference between charsets and encodings, and I have a good picture of the history of ...
toto_tico's user avatar
  • 18.7k
29 votes
3 answers
13k views

In Flask-migrate ValueError: invalid interpolation syntax in connection string at position 15

I am using flask migrate to for database creation & migration in flask with flask-sqlalchemy. Everything was working fine until I changed my database user password contains '@' then it stopped ...
anils's user avatar
  • 1,942
24 votes
1 answer
49k views

Right way to get username and password from connection string? [duplicate]

I have a connection string like this: "SERVER=localhost;DATABASE=tree;UID=root;PASSWORD=branch;Min Pool Size = 0;Max Pool Size=200" How do I get the various database parameters out of it? I can get ...
nawfal's user avatar
  • 72.3k
15 votes
1 answer
13k views

What's the Option=N in the MySQL ODBC connection string?

I have seen both Option=3 and Option=4 in connection string samples for MySQL ODBC but no explanation or documentation. What do those numbers mean?
hawbsl's user avatar
  • 15.8k
13 votes
7 answers
34k views

How to connect to mysql from C# over SSH

How can I connect to a mysql database trough C#, This is my connection string now: connectionString="server=localhost;port=3306;user id=root;Password=*****;database=Data" providerName="MySql.Data....
user123_456's user avatar
  • 5,755
12 votes
2 answers
51k views

How to find connection string from a phpMyAdmin database?

I want to connect from java, to a database which i am currently managing from phpMyAdmin. I do not own the server which the database runs. however, i want to find the connection string of that ...
Anonymous's user avatar
  • 193
11 votes
4 answers
40k views

pyodbc + MySQL + Windows: Data source name not found and no default driver specified

I am trying to connect to MySQL 5.6 on a Windows Server 2008 R2 localhost with pyodbc. I used the full installation for the MySQL instance on the localhost, including the ODBC connector. I have it ...
sct.chang's user avatar
  • 121
10 votes
2 answers
36k views

What does "pooling=false" in a MySQL connection string mean? [closed]

What does pooling=false in a .NET connection-string for a MySQL database mean? This is the complete connection string: return new MySqlConnection("SERVER=localhost;DATABASE=myDataBase;USER=###;...
Bruno Casali's user avatar
  • 1,359
9 votes
2 answers
6k views

What, exactly, does allowMultiQueries do?

Adding allowMultiQueries=true to the JDBC string makes MySQL accept Statements with multiple queries. But what exactly does this do? Is there any benefit to this? Perhaps it reduces the delay due ...
Paul Draper's user avatar
  • 81.7k
8 votes
3 answers
22k views

With VBA, find the version of the MySQL ODBC driver installed in Windows

Using Visual Basic for Applications, how can I find out which version of the MySQL ODBC driver is installed in Windows on a user's machine? I have a Microsoft Access application that uses the MySQL ...
Ben McCormack's user avatar
8 votes
3 answers
105k views

How to find the Server Name of MySQL

Where can I find the name of MySQL which I'll use at the connection string to connect to the database from c#?
Ahmad Farid's user avatar
  • 14.7k
8 votes
4 answers
6k views

How do I set SQL mode in the JDBC connection string for MySQL 8?

I recently upgraded my MySQL instance from 5.7 to 8.0. I connected to my old instance using JDBC and a connection string that looked like this: jdbc:mysql://[host:port]/[database]/?sessionVariables=...
Fernet's user avatar
  • 183
8 votes
7 answers
9k views

How can I protect a mySQL connection string in PHP?

I know the rule: never hardcode your password, and I've seen this question here which explains what to with Java and mySQL, but I don't know what to do for PHP and mySQL. The current connection ...
T9b's user avatar
  • 3,462
6 votes
4 answers
5k views

Why should I use connection pooling?

In my C# application I connect to a MySQL database and run 10,000 queries. If I keep a connection to my database, these queries take roughly 14 seconds. However, if I rely on the connection pooling my ...
l33t's user avatar
  • 19.7k
6 votes
2 answers
14k views

SSH connection to MySQL using SSH.NET library

I was given a link to use this library for connection through SSH connection to a MySQL database with C#. Here is the LINK to the library as a lot of you will find this interesting as you don't need ...
user123_456's user avatar
  • 5,755
6 votes
2 answers
2k views

How to Yii app protected connection string?

I'm hosting a Yii app on shared-host with some my friend, and keep database in private MySQL server. As you knew, database info can be found so very easy in protected\config\main.php by another host ...
Davuz's user avatar
  • 5,168
6 votes
2 answers
42k views

Reading from the stream has failed - MySqlException

I'm trying to open a connection to a MySql database using the following code piece: string connectionString = "Server=ip_number;Database=database_name;Uid=uid;Password=password"; MySqlConnection ...
xkcd's user avatar
  • 2,590
5 votes
2 answers
22k views

Connection String for MySQL, VS2010 Pro, ASP .NET MVC3

Background I'm following this tutorial, but instead of using SQL Compact, I'd like to use MySQL. I'm having trouble with the connection string needed for this connection. I've installed MySQL ...
SB2055's user avatar
  • 12.6k
5 votes
4 answers
2k views

Java newbie needs help in database connection

I'm new to Java and even newer to java database connections. I've managed to create a database connection and query a table when I put it in the Main class. Now that I've moved it into a new class ...
iamjonesy's user avatar
  • 25k
5 votes
4 answers
8k views

Connection Lifetime=0 in MySql connection string

What exactly does Connection Lifetime=0 mean in a connection string?
Quintin Par's user avatar
  • 16.2k
5 votes
2 answers
461 views

Understanding MySQL password

Probably I cant get more dumb, but seriously this is the first time I had to think about it(for the first time the single user app goes multi-user from multiple locations). For what purpose is a ...
nawfal's user avatar
  • 72.3k
4 votes
3 answers
21k views

Two hosts in jdbc url

We are using jdbc url like jdbc:mysql://localhost:3306/mysql. How could I set second mysql host in this url? If this is imposible, how could I set in my java application (hibernate) connection to ...
Dedyshka's user avatar
  • 471
4 votes
2 answers
2k views

ADO.NET connection string and password with "=" in it

How do I build a connection string which includes a passsword having a "=" in it? (I'm connecting to MySql 5.1) For example, let's say the password is "Ge5f8z=6", what would the connection string ...
Philippe Leybaert's user avatar
4 votes
2 answers
2k views

Problem with nhibernate, Mysql, and Guids

I have a view that flattens out a hierachy of 4 tables to display as a report. within the view it contains the primary keys (Guid) of each of the tables along with some display data. The problem is ...
Nathan Fisher's user avatar
3 votes
3 answers
1k views

Unsure how to set C# Connection string depending on solution configuration

I'm trying to figure out how to use Solution Configuration Management in Visual Studio to set a MySQL Connection string depending on what build configuration but am fairly new to this. I've found ...
Sean Missingham's user avatar
3 votes
1 answer
3k views

Visual Studio 2010's generate model from database gives error message when trying to connect to DB with MySQL ADO.NET drivers, how to fix?

I am trying to generate my ADO.NET entity model from my MySQL database using the official Connector/Net 6.4.3 ADO.NET drivers from MySQL. However, after I type in my DB-info, and click next (Test ...
Kjetil's user avatar
  • 484
3 votes
1 answer
4k views

problem connecting to mysql from vs2010

I am trying to connect to mysql using c# in vs2010. I installed the 6.3.5 version of the .net connector from the mysql site. I try using the following connection string - <add name="mySql" ...
czuroski's user avatar
  • 4,312
3 votes
2 answers
11k views

What is the connection string for Google Cloud mySQL, in node.js?

The scenario is as follows: I am writing an node.js app locally and want it (the mySQL modul, rather) to connect to a mySQL db running on Google Cloud Platform. I can not get the connection string ...
marko-36's user avatar
  • 1,416
3 votes
2 answers
3k views

MySQL exceptions not caught (C#)

My C# program works with a MySQL database. For some reason the program cannot catch exceptions caused my the MySQL connection. Example: If I make the credentials in the connection string invalid, ...
Louisa's user avatar
  • 552
3 votes
1 answer
2k views

How do you tell if a connection string belongs to MySql or SQL Server?

Is there a way to test if a connection string is valid without attempting to open a connection? I need to find out if a connection string is a MySql connection string, or a SQL Server connection ...
Charles W's user avatar
  • 2,282
3 votes
2 answers
8k views

Creating Database Model on ASP.NET MVC with MYSQL

I'm using ASP.NET C# with database MYSQL, I follow this step on creating a database model with Entity Data Model Wizard http://www.asp.net/mvc/tutorials/movie-database/create-a-movie-database-...
ThreadRoar's user avatar
3 votes
1 answer
3k views

Connecting to MySql database in C#

I have a Visual Studio 2008 C# .NET 3.5 application where I am trying to connect to a locally hosted MySQL 5.1.53 database using System.Data.Odbc. using (System.Data.Odbc.OdbcConnection c = new ...
PaulH's user avatar
  • 7,833
2 votes
5 answers
17k views

MySql Connection string on GoDaddy (remote server) [closed]

I need to connect to a database on godaddy and insert some values. All the code is in place and it works on localhost. However I do not know how to connect to the online database. I chose the remote ...
Code Bunny's user avatar
2 votes
8 answers
12k views

How to encrypt mysql password in php (or how to defeat automated code scanner red flag)

Management strikes again. How should I satisfy the code scanner that is going to read my php source and red flag my MySQL connection string? Linux Server (soon to be Sun) php 4.2 (soon to be latest ...
MrChrister's user avatar
  • 3,585
2 votes
1 answer
6k views

Query to MySQL from c# returns System.Byte[]

I am using the below SP to return the value of Generated Insert statement and it works fine when executed in Query browser. When i try to get the value from C#, it give's me "System.Byte[]" as ...
Anuya's user avatar
  • 8,302
2 votes
2 answers
8k views

How to change the database name in Entity Framework

I'm trying to find a way to change the database name in my web.config and my context. No other info in my connection string changes but the database name. public APIContext(string dbname = "...
brachen33's user avatar
  • 117
2 votes
2 answers
2k views

MySQL c# Connection String failover

I am aware that I can seperate hosts in the connection string with a comma and it will use different servers: https://www.connectionstrings.com/mysql-connector-net-mysqlconnection/multiple-servers/ ...
Odatia's user avatar
  • 65
2 votes
2 answers
11k views

How to generate the right connection string for MySql

I have ASP.Net MVC site & using EF Code First As Database, I am using MySql. But not getting the right connection string. If it was MSSQL I could have easily generate using Visual Studio itself. ...
Kgn-web's user avatar
  • 7,417
2 votes
1 answer
3k views

How to convert Char field to datetime field in mysql?

I have datetime stored in a table as Char(30) and i want to convert them into mysql standred datetime format. so I tried this SELECT STR_TO_DATE(next_attempt, '%Y-%m-%d %T') as date FROM Table ...
Jaylen's user avatar
  • 40k
2 votes
3 answers
3k views

MySql Connection String error in ASP.NET Core Project

I am building my first ASP.NET Core WebApplication and I am using a MySQL Database for it. After I imported the DB-Context with the EF Core Power Tools I saved the Connection String in the appsettings....
Kellogs's user avatar
  • 23
2 votes
4 answers
7k views

C# with MySQL connector - access denied

I have a remote hosted website with a MySQL database. I am trying to access that database from a small C# program. What I've tried: Referencing the MySQL DLL in the project Using MySQL connection ...
Georgian's user avatar
  • 8,923
2 votes
1 answer
3k views

What is wrong with this mysql connection string?

I am using this connection string, <add name="connectionString" connectionString="server=10.1.1.16;user id=root; password=lmslive; database=lmslive; pooling=false;" providerName="MySql.Data....
ACP's user avatar
  • 35.1k
2 votes
2 answers
2k views

Mysql utf8mb4 connection string (Node.js, serverless-mysql package)

I've changed my Mysql defaults to utf8mb4, however emojis are still getting refused by mysql. Error: ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect string value: '\xF0\x9F\x92\xA9</...' I'm ...
lpetrucci's user avatar
  • 1,527
2 votes
1 answer
189 views

Unable to connect two dockers together, one database, one .net core application

I'm building an api with .NET Core and MySQL and it's all done. I am now setting it up in Docker. First I've set up the application in Docker connecting to the database running locally on my laptop. I'...
Ravenix's user avatar
  • 1,020
2 votes
1 answer
2k views

Is setting a connection string in web.config a security vulnerability? (ASP.NET MVC, Entity Framework)

I am developing a ASP.NET MVC 5 web application with Entity Framework 6 using a MySQL database. My Connection string in web.config looks like this: <connectionStrings> <add name="...
Beardy Bear's user avatar
2 votes
3 answers
6k views

Good ways to connect to database with C# [closed]

Good day to all, I'm new to programming and I'm building like a simple program. Just buttons and display the results. This is how I connect to database. I used MySQL.data.dll and add it as reference. ...
Boy Karton's user avatar
2 votes
4 answers
518 views

Too many connections to DB preventing some queries from executing

I have an issue where users on my web site have recently begun to receive the error message: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) I know that the ...
Jen's user avatar
  • 361
2 votes
1 answer
432 views

C# - How to safely store MySQL connection string so nobody can see it?

I am making one app right now, and I have a question: Where can I store my MySQL connection string so nobody will be able to get it (for example with .NET Reflector). Encrypting it into app.conf won'...
Lukas Seidler's user avatar
2 votes
2 answers
10k views

Database connection string and collation

Is it possible to set connection collation within MySql connection string and how, since there's a default setting on the server that's used for new connections. Two things I can't do: Can't call ...
Robert Koritnik's user avatar

1
2 3 4 5