Mysql server installed but not running

Mysql server installed but not running

I tried to install mysql 5.6.12 using the following procedure

# Preconfiguration setup
shell> groupadd mysql
shell> useradd -r -g mysql mysql
# Beginning of source-build specific instructions
shell> tar zxvf mysql-VERSION.tar.gz
shell> cd mysql-VERSION
shell> cmake .
shell> make
shell> make install
# End of source-build specific instructions
# Postinstallation setup
shell> cd /usr/local/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
# Next command is optional
shell> cp support-files/my-default.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server

Source: [Installing MySQL Using a Standard Source Distribution][1]

Now the problem is

I did

 shell> /etc/init.d/mysql.server start

 *  Mysql is running

But when I do something like

 shell> mysql

 The program 'mysql' is currently not installed. You can install it my typing: apt-get install mysql-client-core-5.5

Now what should I do. Please Help.

答案1

To run MySQL from terminal, you have to have the Client package, as per you output above. To install, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install mysql-client-core-5.5 

Or

To install click MySQL database core client 安装 comixcursors-lefthanded

答案2

It ought to have built the mysql client when you built and installed from source. To check, take a look in the bin directory inside the source directory that you did the build in. I am not sure where it would have installed to, though. You could try running find / -name mysql -type f to find it. Then look at whether that location is on your path (echo $PATH).

相关内容