Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I've installed MySQL on a Mac OSX Snow Leopart but I am unable to launch it through the terminal:
$ mysql
-bash: mysql: command not found
With $ echo $PATH:
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin/usr/local/mysql/bin/mysql
With this:
$ /usr/local/mysql/bin/mysql
It works but I am unable to use it with Ruby on Rails. So I guess there's something that I'm missing. My apologies if it isn't clearly explained.
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin/usr/local/mysql/bin/mysql
should be
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/mysql/bin
Path goes to directories and you need the : between entries.
You can also symlink mysql into something in your path
ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
Getting this error when go application is trying to connect with MySQL 8
This error is coming because MySQL increases its security level in a new version. It has changed its default authentication plugin from mysql_native_password to caching_sha2_password.
The workaround to resolve this issue is
First locate your my.cnf file location using below command.
mysql --help | grep "Default options" -A 1
Then update my.cnf , using below lines
[mysqld]
# Only allow connections from localhost
bind-address = 127.0.0.1
**default-authentication-plugin=mysql_native_password** // add this line
cd /usr/local/bin
mysql.server stop
mysql.server start
This will solve your issue :)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
i am having an issue trying to connect to my mysql after installing it with homebrew...
im unsure what my next steps should be in order to troubleshoot/fix, i am going step by step with an online video tutorial and it doesnt offer me any advice.
the error:
Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
location of installation:
/usr/local/bin/mysql
version:
mysql Ver 14.14 Distrib 5.7.10, for osx10.11 (x86_64) using EditLine wrapper
First of all, make sure MySQL is up and running:
mysql.server start &
ps axffu|grep mysql
the above should print out the pid of running mysql process.
If this did not resolve an issue, try to locate the socket:
find /usr/local/mysql -name mysql.sock
find /var/mysql -name mysql.sock
and either update your configuration, or just create a symbolic link to it:
sudo ln -s FOUND_LOCATION /tmp/mysql.sock
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm running ubuntu 10.04 and recently have installed mysql server 5.1
but when i tried to log in, it showed me an error like this:
can't log in to mysql server through /var/run/mysqld/mysqld.sock
But last day I tried to kill all mysql processes and start again ,and when I killed mysqld_safe ,surprisingly I managed to log in and perform queries on mysql server through
mysql -u root -p
Now I want to ask if I can disable mysqld_safe for ever.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I just installed mySQL (mysql-5.5.19-osx10.6-x86_64) on my Mac OS X and when I try to run one of the mysql command like mysqld I get the following error:
-bash: mysqld: command not found
Is there something I am missing? I've tried restarting Terminal and I made sure to run the command for the files located in /usr/local/mysql/bin.
Thanks
/usr/local/mysql/bin is most likely not in your system's PATH environment variable. You can add it to your path by adding a line like this to your ~/.bash_profile
export PATH=${PATH}:/usr/local/mysql/bin
(you'll need to restart your shell for the above to take effect.) Another option is to symlink the MySQL binaries to a directory that is already on your path. Something like this:
sudo ln -s /usr/local/mysql/bin/mysqld /usr/bin/mysqld
You'll need to enter the root password in order to add symlinks to /usr/bin. Alternatively, you could make no changes at all and simply use a fully qualified path to execute the command
/usr/local/mysql/bin/mysqld
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I am try to restore a big database from file using this command
source /path/to/database/file
it is return this error:
Failed to open file '/path/to/database/file', error: 27
the .sql file size 4.1G
If that's a file created by the mysqldump command, you'll probably want to run it using the mysql program. That'll be something like mysql -u <username> -p <databasename>
The mysqlimport command is another command you might wanna look at.