Can't use "which mysql" in zsh, but in bash work [closed] - mysql

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
After Upgrade to Ubuntu 12.04 LTS, and install mysql server 5.5, I Can't use "which mysql" in zsh, but in bash work!!
Here is my echos:
ZSH:
$ whereis mysql
mysql: /usr/bin/mysql /etc/mysql /usr/lib/mysql /usr/bin/X11/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.g
$ which mysql
mysql: aliased to nocorrect mysql
$ alias
...
...
mysql='nocorrect mysql'
...
...
BASH:
$ whereis mysql
mysql: /usr/bin/mysql /etc/mysql /usr/lib/mysql /usr/bin/X11/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.g
$ which mysql
/usr/bin/mysql

Related

does anyone knows how to install mysql on ubuntu ec2 instance [closed]

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 5 years ago.
Improve this question
i tried it several times but there are always an error can anyone give me the codes which I can run and try based on apt-get tool
Install MySQL
sudo apt-get update
sudo apt-get install mysql-server
During the installation you will be prompt for a root password.
Configure MySQL
sudo mysql_secure_installation
Test your MySQL installation
mysqladmin -p -u root version
Or you can use an image that has MySQL pre installed and configured for you.
MySQL powered by Bitnami

MySql ERROR! The server quit without updating PID file [closed]

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 inherited a computer that previously had MySql server installed and then uninstalled (apparently, it ran fine before the uninstall). I am in Database class, so I tried to install it again and now I get the error:
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/mysql/data/Computer.local.pid).
I looked online and saw this error happened to others, but either a)I couldn't figure out how to do the fix or b)the fix didnt work for me.
I tried(from http://coolestguidesontheplanet.com/mysql-error-server-quit-without-updating-pid-file/):
Computer:/ computer$ /usr/local/mysql/support-files/mysql.server restart
And I get this error:
ERROR! MySQL server PID file could not be found!
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/mysql/data/Computer.local.pid).
I am not sure what they are telling me to do here:
Remove /etc/my.cnf or just back it up for now and restart:
sudo mv /etc/my.cnf /etc/my.cnf.bak
because I get this error when I type:
Computer:/ computer$ cd /usr/my.cnf
-bash: cd: /usr/my.cnf: No such file or directory
I also see from: mysql ERROR! The server quit without updating PID file?
That there are error logs and the my.cnf file, but I am not sure to access them.
The MySql I downloaded: mysql-5.7.10-osx10.9-x86_64.dmg
I am on a mac version 10.7.5
Thanks!
Mostly this is a permission issue
Step1: Check the error file first.
tail -f /usr/local/mysql/data/*.err
Step2: Do a complete shut down or kill the process. Confirm that no mysql process is running
mysqladmin -uroot shutdown
sudo killall mysqld
ps -ef | grep mysql
Step3: Give permisiions
sudo chown -RL root:mysql /usr/local/mysql
sudo chown -RL mysql:mysql /usr/local/mysql/data
chmod -R 755 /usr/local/mysql/data
Step4: Start mysql
sudo mysql.server start

I can't unistall mysql on ubuntu 12.10 [closed]

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 9 years ago.
Improve this question
I unistalled mysql-server from my ubuntu 12.10 machine, but if I type "mysql" on shell it prompts me the command line of a possible another mysql instance.
I want to remove it completely.
I tried this command: sudo apt-get remove mysql-server php5-mysql and
sudo apt-get remove --purge mysql-client mysql-server
They run ok like it was unistalled everything about mysql.But as I said, if I type mysql on shell it prompts me mysql command line.
Please, I need help.
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo rm -rf /var/lib/mysql
Run remove --purge on all the packages including common as shown above, and then remove the /var/lib/mysql folder.
That should do it.
When you have mysql fully installed on a system, it includes both the server (mysqld) and the client (/usr/local/bin/mysql or similar).
Therefore you have to remove the client as well as the server in order to get rid of what runs when you type 'mysql' on the command line.
sudo apt-get remove --purge mysql-client

MySQL 5.6.10 via apt-get [closed]

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
MySQL 5.6.10 is Generally Available now. If I try to upgrade it however says that I am already at the newest version, even though the installed version is 5.5.29. I am on Ubuntu 12.04.
$ sudo apt-get install --upgrade mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 34 not upgraded.
$ mysql --version
mysql Ver 14.14 Distrib 5.5.29, for debian-linux-gnu (x86_64) using readline 6.2
I ran sudo apt-get update beforehand.
Did anyone manage to install MySQL 5.6 via aptitude yet?
I don't know how to do this via aptitude but you can try to compile newest version from source.
Install libaio
$ cd /opt
$ wget http://www.morphisms.net/~wkj/download/libaio.tbz
$ bunzip2 libaio.tbz
$ tar xf libaio.tar
Download MySQL 5.6.10
$ wget http://www.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.10.tar.gz/from/http://cdn.mysql.com/
$ tar xzf mysql-5.6.10.tar.gz
$ cd mysql-5.6.10
Configure and compile MySQL
$ PATH=$PATH:/opt/bison/bin #bison binary should be in your path
$ cmake . -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DMYSQL_DATADIR=/opt/mysql-5.6.10/data/
-DCMAKE_INSTALL_PREFIX=/opt/mysql-5.6.10 -DCURSES_LIBRARY=/opt/ncurses/lib/libncurses.a
-DCURSES_INCLUDE_PATH=/opt/ncurses/include/ -DHAVE_LIBAIO_H=/opt/libaio/include/
-DINSTALL_LAYOUT=STANDALONE -DENABLED_PROFILING=ON
-DMYSQL_MAINTAINER_MODE=OFF -DWITH_DEBUG=OFF -DDEFAULT_CHARSET=utf8
-DENABLED_LOCAL_INFILE=TRUE -DWITH_ZLIB=bundled
$ make
Set correct system locations!
Install
make install
It is working for me. Via: http://www.geeksww.com/tutorials/database_management_systems/mysql/installation/download_configure_compile_and_install_mysql_56.php

Uninstall MySQL completely from Ubuntu [closed]

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 9 years ago.
Improve this question
I have trouble uninstalling MySQL from Ubuntu. I used the following commands, it doesn't seem to help as I still find the MySQL folder in /etc directory
aptitude remove mysql-client
aptitude remove mysql-server
aptitude remove mysql-common
Please suggest a good way to uninstall it completely and any command to check if the uninstallation was successful. Thank you!
sudo apt-get remove --purge mysql-client mysql-server