How to install mysql?
mysqlin my command line :
The program 'mysql' is currently not installed. You can install it by typing: sudo apt-get install mysql-client-core-5.5
But when I do:
sudo apt-get install mysql-client-core-5.5
But I get:
Reading package lists... Done Building dependency tree Reading state information... Done mysql-client-core-5.5 is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 47 not upgraded.
How should I proceed?
This is what I got `ls: cannot access /usr/bin/mysql: No such file or directory`, when I do `ls -l /usr/bin/mysql`
First, remove the current version of MySQL you're already using:
$ sudo apt-get purge mysql-client-core-5.5
Now, to install MySQL, run the following command from a terminal prompt:
$ sudo apt-get install mysql-server $ sudo apt-get install mysql-client
During the installation process you will be prompted to enter a password for the MySQL root user.
Once the installation is complete, the MySQL server should be started automatically. You can run the following command from a terminal prompt to check whether the MySQL server is running:
$sudo netstat -tap | grep mysql
When you run this command, you should see the following line or something similar:
tcp 0 0 localhost.localdomain:mysql *:* LISTEN -
If the server is not running correctly, you can type the following command to start it:
$ sudo /etc/init.d/mysql restart
You can edit the
/etc/mysql/my.cnffile to configure the basic settings: log file, port number, etc.
@batman we are expecting some reply from you or at least a `verified` marking
most of this answer appears to be cut and paste from https://help.ubuntu.com/12.04/serverguide/mysql.html
This command installs the MySQL server, which you need.
sudo apt-get install mysql-server
If you want to run commands from the workbench and not from a terminal, you need the client as well (this is optional):
sudo apt-get install mysql-client
For MySQL Workbench (also optional):
sudo apt-get install mysql-workbench