Giter Site home page Giter Site logo

Comments (15)

huyphams avatar huyphams commented on May 18, 2024 43

Hi @zisiszikos you can connect using the full path comand:
mysql --socket /tmp/mysql_3306.sock -uroot
DBngin supports multiple ports so it will cause conflict of socket if we use the same socket path for all running services.
Also on the new DBngin version, you don't need to export binary, just click the arrow button and it will open terminal.

from dbngin.

hopewise avatar hopewise commented on May 18, 2024 7

I have the same issue:
it asks to add:

# DBngin exports
export PATH=/Users/Shared/DBngin/mysql/5.7.23/bin:$PATH

how ever, its already adde and sourced.

from dbngin.

koriym avatar koriym commented on May 18, 2024 6

@maskedjellybean

Adding function to ~/.bashrc works.

function mysqls() {
  command mysql --socket /tmp/mysql_$1.sock -uroot
}

mysqls 3036 connects port 3306 DBngin mysql server.

from dbngin.

maskedjellybean avatar maskedjellybean commented on May 18, 2024 3

I'm still experiencing this issue. Running mysql --socket /tmp/mysql_3306.sock -uroot does work, but I would really like to be able to run mysql -uroot. Does DBngin require connecting via socket?

from dbngin.

zisiszikos avatar zisiszikos commented on May 18, 2024 2

Is this really working?

I follow those steps:

  1. Strarting MySQL 5.7.23 : 3306 from DBngin interface
  2. Open terminal and run: export PATH=/Users/Shared/DBngin/mysql/5.7.23/bin:$PATH
  3. which mysql returns correctly /Users/Shared/DBngin/mysql/5.7.23/bin/mysql
  4. running ps -ax | grep mysql | grep -v grep finds the following process:
    /Users/Shared/DBngin/mysql/5.7.23/bin/mysqld --user=_mysql --port=3306 --socket=/tmp/mysql_3306.sock --basedir=/Users/Shared/DBngin/mysql/5.7.23
  5. running mysql command I get the following:
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    which is expected because it is trying to find the /tmp/mysql.sock but the service is showing that the socket is /tmp/mysql_3306.sock

Any thoughts about this?

from dbngin.

zisiszikos avatar zisiszikos commented on May 18, 2024 2

Thanks! It works with the socket parameter.

But there is another thing, that I don't know if it is my terminal problem or DBngin problem actually.
When I click the arrow button to open the terminal, the following command is written at the terminal:

export PATH=export PATH=/Users/Shared/DBngin/mysql/5.7.23/bin:$PATH:$PATH

It works, but as you can see the command is incorrectly written. Just confirm please if this a global problem or it is just my terminal.

And of course it would be very nice if there was an option to choose which terminal is going to open. 😄

Thanks.

from dbngin.

debiprasad avatar debiprasad commented on May 18, 2024 2

I'm still experiencing this issue. Running mysql --socket /tmp/mysql_3306.sock -uroot does work, but I would really like to be able to run mysql -uroot. Does DBngin require connecting via socket?

I use oh-my-zsh and I added an alias to make it easy.

from dbngin.

huyphams avatar huyphams commented on May 18, 2024 1

Ah yeah, I've fixed it 😄

from dbngin.

SiddharthPant avatar SiddharthPant commented on May 18, 2024 1

Just stating for everyone's quick reference that to avoid defining aliases you can instead export an environment variable. Just include line export MYSQL_UNIX_PORT=/tmp/mysql_3306.sock at the end of your ~/.zshrc. Now you can connect to mysql using mysql -uroot as usual.
Here are more env vars you can use from mysql docs: https://dev.mysql.com/doc/refman/8.0/en/environment-variables.html

from dbngin.

QinyuHu avatar QinyuHu commented on May 18, 2024

Having the same issue. There are no other instructions on what to do with it.

from dbngin.

kpysanyi avatar kpysanyi commented on May 18, 2024

Yes, is there any solution to fix this issue?
I am also getting Can't connect to local MySQL server through socket '/tmp/mysql.sock' as an error when i try to connect mysql...

from dbngin.

huyphams avatar huyphams commented on May 18, 2024

You can connect with port @kpysanyi if you want to connect with socket, you can lookup the correct socket (with port) in /tmp
I've fixed this issue in the upcoming release.

from dbngin.

huyphams avatar huyphams commented on May 18, 2024

We can create many MySQL versions in DBngin, so it's not possible to use the same socket path for all versions. The current solution is add the port suffix to the local socket.

from dbngin.

huyphams avatar huyphams commented on May 18, 2024

Does DBngin require connecting via socket?

DBngin supports both socket and port, however, mysql -uroot use socket by default that's why you can't connect with the default path.

from dbngin.

izshreyansh avatar izshreyansh commented on May 18, 2024

I have the same issue: it asks to add:

# DBngin exports
export PATH=/Users/Shared/DBngin/mysql/5.7.23/bin:$PATH

how ever, its already adde and sourced.

This worked, Thank you.

from dbngin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.