Home > apache, MySQL, php, ubuntu > Install MySQL on Ubuntu

Install MySQL on Ubuntu

  1. Install the requiered packages
$ sudo apt-get install mysql-server mysql-client mysql-query-browser

To connect to MySQL via command line:

$ mysql -h localhost -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 42
Server version: 5.1.54-1ubuntu4 (Ubuntu)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> quit
Bye

As an alternative to MySQL Query Browser, you can install PHPMyAdmin, that is widely used in ISP web hostings:

$ sudo apt-get install phpmyadmin

During the installation, you can automatically configure it to run with Apache, if you have already installed (https://myotragusbalearicus.wordpress.com/2011/08/31/install-apache-on-ubuntu/).

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: