Closed benmaloway closed 4 years ago
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.
Having the same issue. There are no other instructions on what to do with it.
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...
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.
Is this really working?
I follow those steps:
export PATH=/Users/Shared/DBngin/mysql/5.7.23/bin:$PATH
which mysql
returns correctly /Users/Shared/DBngin/mysql/5.7.23/bin/mysql
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
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?
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.
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.
Ah yeah, I've fixed it 😄
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?
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.
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.
@maskedjellybean
Adding function to ~/.bashrc
works.
function mysqls() {
command mysql --socket /tmp/mysql_$1.sock -uroot
}
mysqls 3036
connects port 3306 DBngin mysql server.
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 runmysql -uroot
. Does DBngin require connecting via socket?
I use oh-my-zsh and I added an alias to make it easy.
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.
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
Please fill out the detail below, it helps me investigate the bug:
I have followed the instructions that appear in a dialog when you do 'command T' or press the console button "Copy this content into your ~/.bash_profile". I refreshed the bash profile and it appears to be correct. When I do an 'echo $PATH' in my terminal I have: /Users/Shared/DBngin/mysql/5.7.23/bin:/Users//.nvm/versions/node/v13.0.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
You can see the default path, along with nvm along with the DBngin path.
But when I go back into DBngin, it still gives me the same dialog window with the instructions to "Copy this content...etc", and no terminal.
If I simply open the terminal and do a 'mysql -u root' with the DBngin instance running I get: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
So first DBngin does not want to open the terminal window from within the application and second the mysql symlink seems to not work anyway from with the cli.
I do like this software and want to avoid having to use heavy stuff like Homebrew, Vagrant or Docker, but I also want to be able to access stuff I would normally when developing for PHP frameworks like Drupal or Symfony. Any advice would be welcome!