Comments (6)
I connected with Mysql and it worked fine when I changed the password.
from slashbase.
PR : #129
from slashbase.
Thanks @dr-coton! Can you tell what type of database connection are you using?
from slashbase.
@paraswaykole
I've done a bunch of tests and it doesn't seem to be the problem I mentioned above.
I created mysql, mariadb, etc with docker and when I tried to connect to them, I got an error.
When I tested both Desktop and Web, there seems to be a lot of mysql errors.
I'll fork the project as much as I can and see where the issue is coming from.
from slashbase.
Thanks @dr-coton! Please add new issues if you find new bugs / errors in MySQL.
from slashbase.
I found the cause.
In the file pkg/queryengines/mysqlqueryengine/queryengine.go
, an error occurred in MySQL TestConnection
.
I don't know the exact reason, but it doesn't work while comparing the test
variable with 1
.
Since the role of the function in MySQL TestConnection
is to test the connection, I changed the code to check for the presence or absence of a value rather than validating the exact value.
AS-IS
func (mqe *MysqlQueryEngine) TestConnection(dbConn *models.DBConnection, config *models.QueryConfig) error {
query := "SELECT 1 AS test;"
data, err := mqe.RunQuery(dbConn, query, config)
if err != nil {
return err
}
test := data["rows"].([]map[string]interface{})[0]["0"].(int64)
if test == 1 {
return nil
}
return errors.New("connection test failed")
}
TO-BE
func (mqe *MysqlQueryEngine) TestConnection(dbConn *models.DBConnection, config *models.QueryConfig) error {
query := "SELECT 1 AS test;"
data, err := mqe.RunQuery(dbConn, query, config)
if err != nil {
return err
}
rows := data["rows"].([]map[string]interface{})
if len(rows) != 0 {
return nil
}
return errors.New("connection test failed")
}
Thanks
from slashbase.
Related Issues (20)
- On Windows, the app shows wails.localhost refused to connect momentarily HOT 1
- MongoDB array update from UI makes it null. HOT 1
- Improve code quality HOT 4
- After inserting data in table, I have to close table tab and open it again to see data change HOT 2
- Enable SSL in MySql connections
- When editing table and on selecting it goes to blank white screen HOT 4
- [PostgreSQL]This link cannot be added to slashbase when the database connection name is the same as before
- No support for `enable-cleartext-plugin` in mysql
- for mac_app_chip, couldn't create a new query tab HOT 5
- Adding more Integration test HOT 3
- panic: failed to init GTK HOT 3
- Permission issue while running binary on server HOT 2
- Postgresql commands give syntax error in in-app CLI
- Feature request: in console - scroll through the commands history HOT 1
- Console doesn't scroll properly to the bottom HOT 3
- Make input field border red if it is empty while creating new database connection HOT 1
- show tables command does not work in mysql console
- Add button to remove filter on table
- Add refresh button in history tab HOT 4
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 slashbase.