Using Linux. I'm trying to learn PHP so I'm also going to need to learn some MySQL to work with my PHP code. Do I need mysql client or mysql server? I thought it was on my system but after issuing the command 'mysql' I got the following error.

garrett@bedroom ~ $ mysql
The program 'mysql' is currently not installed. You can install it by typing:
sudo apt-get install mysql-client-core-5.5

Recommended Answers

All 2 Replies

Member Avatar for 1stDAN

hi, you have to install both server and client (sudo apt-get install mysql-server mysql-client). You can also install client separately (sudo apt-get install mysql-client).

If you have already done some attemps to install mysql on ubuntu, it is very important that you remove directory /var/lib/mysql explicitly after each removing of mysql itself (sudo apt-get remove --purge mysql-server mysql-client) and before new installation (sudo apt-get install mysql-server mysql-client).

I hope that will help.

Its better to install the whole LAMP(Linux, Apache, Mysql,Perl PHP) combination..The steps are very simple, just google the steps to install there are some set of sudo command to install mysql and apache

then try mysql -u<username> -p password

you should get mysql> prompt, if you want to make mysql more easy, install phpmyadmin which gives the user interface to create and manage the database...This will make the task more easy to understand

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.