Comments (4)
Hi,
When you are using a test running on a system with an existing MySQL server, you have to use another port than the default (3306).
You can start the server using another port like this: MySqlServer.StartServer(int serverPort):
Let me know if it helps you.
from mysql.server.
Hello,
I've tried it as ;
dbServer.StartServer(3316);
and with some another different ports , but still throws exception. It works when i manually stop MySql service from Service Management.
Edit : I am using MySQL Server 5.7
from mysql.server.
Sorry, my comment is misleading. When I've changed the port, it doesn't throw exception on StartServer function anymore. I throws error at following line ;
MySqlHelper.ExecuteNonQuery(dbServer.GetConnectionString(), "CREATE DATABASE TestDataBase;");
And this is the exception message :
{"Authentication to host '127.0.0.1' for user '' using method 'mysql_native_password' failed with message: Access denied for user ''@'localhost' (using password: NO)"}
from mysql.server.
Ok , i've found a solution ;
Problem is connection string that returns from function ;
dbServer.GetConnectionString()
This function returns connection string as ;
Server=127.0.0.1;Port=3316;Protocol=pipe;
I assume when you add "Protocol=pipe" to connection string, it tries to connect to MySql Instance that is already installed rather than the one we create for testing.
When I set connection string manually as ;
...
dbServer = MySqlServer.Instance;
dbServer.StartServer(3316);
MySqlHelper.ExecuteNonQuery("Server=127.0.0.1;Port=3316;", "CREATE DATABASE TestDataBase;");
.....
It worked
from mysql.server.
Related Issues (13)
- Cannot co-exist with existing Mysql server HOT 5
- "Table 'mysql.proc' doesn't exist" when creating stored procedure HOT 3
- Connection to 127.0.0.1 stopped working
- Can you update to a new version of mysqld
- Connection 'Protocol=pipe' Not Supported Error
- Make it possible to specify a custom port for the test instance HOT 3
- Cannot start after shutdown
- Previous instances not closed properly HOT 2
- Doesn't work if instance of mysql is running HOT 1
- TestKillProcess test fails After Shutdown() HOT 2
- Can't get the server to start HOT 1
- .NET Core Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mysql.server.