All Questions
Tagged with connection-string mysql
240
questions
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.
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 ...
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 ...
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 ...
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?
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....
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 ...
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 ...
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=###;...
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 ...
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 ...
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#?
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=...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
5
votes
4
answers
8k
views
Connection Lifetime=0 in MySql connection string
What exactly does Connection Lifetime=0 mean in a connection string?
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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" ...
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 ...
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, ...
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 ...
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-...
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 ...
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 ...
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 ...
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 ...
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 = "...
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/
...
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.
...
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 ...
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....
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 ...
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....
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 ...
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'...
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="...
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.
...
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 ...
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'...
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 ...