mysql command does not execute mysql
NickName:Leon Gaban Ask DateTime:2016-03-17T00:58:11

mysql command does not execute mysql

The path to my bin folder with mysql:

usr/local/mysql/bin

Here is my zshrc bash config:

export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin:/Users/leon/bin/subl"
export PATH="/bin:/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$PATH"

When I type mysql I get the following

enter image description here


Commands run:

echo $PATH
/Users/leongaban/.nvm/versions/node/v5.8.0/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

which mysql
mysql not found

mysql --help
zsh: command not found: mysql

sudo find / -name mysql
Password:
/Applications/MySQLWorkbench.app/Contents/MacOS/mysql

ps -ef | grep mysql
   74    96     1   0 11:18AM ??         0:02.90 /usr/local/mysql/bin/mysqld --user=_mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --log-error=/usr/local/mysql/data/mysqld.local.err --pid-file=/usr/local/mysql/data/mysqld.local.pid --port=3307
  501 16302  9174   0  1:27PM ttys001    0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn mysql

Copyright Notice:Content Author:「Leon Gaban」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/36042194/mysql-command-does-not-execute-mysql

Answers
heyhey2k 2016-03-16T17:09:51

Here are a few commands that might help determine more about the problem:\n\necho $PATH\nwhich mysql\nmysql --help\nfind / -name mysql\nps -ef | grep mysql\n\nIf you still have no clue you might post the output to those commands here. Also to paraphrase Alex Trebek, please phrase your post in the form of a question. What are you expecting to see?",


More about “mysql command does not execute mysql” related questions

Execute MySQL Command in Kubernetes POD

does any one has an idea how to execute MySQL command inside Kubernetes POD from GitLab Runner ? My Problem: I want to create two View Table for my Database that is setup and ready inside a GitLab

Show Detail

mysql command does not execute mysql

The path to my bin folder with mysql: usr/local/mysql/bin Here is my zshrc bash config: export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin:/Users/leon/bin/subl" ex...

Show Detail

MYSQL command to execute multiple .sql files

I am wanting to write and execute a single mysql .sql file that will execute multiple other .sql files. I am looking for something equivalent to Oracle's: @script1.sql @script2.sql @script3.sql D...

Show Detail

how to execute mysql command DELIMITER

I have huge problem (for me) I need to execute the MySQL command DELIMITER | from PHP, but mysql_query() fails with an error. I found that mysql_query() doesn't support the use of DELIMITER, because

Show Detail

Python Mysql Update Execute Command

I am trying to execute the following command, setting "store"="result", for the row where the code column equals "code". cursor.execute("""UPDATE pjStores SET %s=%s WHERE code=%s""", (st

Show Detail

Unable to execute mysql command with password provided at commandline

I have to execute MySQL command without entering the MySQL prompt any interaction. For this I have to specify password at command-line , such as mysql -u 'user' -p'password' command; Though my user

Show Detail

How to execute MySQL command from the host to container running MySQL server?

I have followed the instruction in https://registry.hub.docker.com/_/mysql/ to pull an image and running a container in which it runs a MySQL server. The container is running in the background and I

Show Detail

Execute MySQL From Command Line with Zend Server

EDIT: FYI - These queries are going to a MySQL db on a DIFFERENT server. I am NOT querying the MySQL DB on my Mac. However, it is using the LOCAL mysql client installed by Zend server. UPDATE : ...

Show Detail

Unable to execute command: MySQL

create table `payrollmanagementsystem`.DEDUCTION ( CODE VARCHAR(50) not null primary key, NAME VARCHAR(50), SALARYPERDAY DOUBLE PRECISION, LEAVE INT, KWSP DOUBLE PRECISION,

Show Detail

How does escaping of mysql execute command with "insert into" work

The command ssh ionos "mysql --verbose -usam -e 'insert into aladin.products (name,price) values ('\'test\'','\'test\'');'" does work. But why do the escape characters work?

Show Detail