I'm trying to install mysql in ubuntu to run ruby on rails. I was going through the tutorial at Lynda. I have successfully installed ruby, gem & rails.
ruby -v ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] gem -v 1.8.15 rails -v Rails 2.3.14
Now, I am trying to install mysql. To do this, the tutorial asks to update the .profile file by adding a line.
# ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package. # the default umask is set in /etc/profile; for setting the umask # for ssh logins, install and configure the libpam-umask package. #umask 022 # if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi # set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi
I added the following line to it:
I exited the terminal & opened a new instance. & when I do:
It gives me:
mysql isn't coming up in the path.
To install mysql, I did:
sudo apt-get install mysql-client-core-5.5
& I can see that mysql is installed:
which mysql /usr/bin/mysql
But I cannot see mysql version:
mysql -v ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
What do I need to do install mysql. Will solving this error allow me to access mysql from the terminal or do I need to do anything else as well?