Install mysql-server, MySQL-client, and workbench in Ubuntu (MySQL graphical management tool)

Source: Internet
Author: User

I. Introduction

Java is cross-platform, but most Java B/S programs are deployed on the Linux platform, because Linux has the advantages of open source and free. So I decided to use the Linux system when learning Java. MySQL is a frequently used database program. The following describes how to install MySql in Ubuntu as a reference.

Ii. Install MySQL

1. install two programs to install MYSQL:
Mysql-server and MySQL-Client

2. Install MySQL

First, check whether MySQL exists. Enter the command sudo netstat-tap | grep MySQL.

If no, enter sudo apt-Get install mysql-server mysql-client.

  
During installation, you will be prompted to enter the root user password.

After installation, enter sudo netstat-tap | grep myslq again, for example:


Use the following command to connect to MySQL and test whether the connection is successful.

3. log on to MySQL

The command used to log on to MySQL is mysql. the syntax of MySQL is as follows:
MySQL [-u username] [-H host] [-P [Password] [dbname]
Username and password are the usernames and passwords of MySQL respectively.


The prompt "mysql>" appears. Congratulations! The installation is successful!

  4. Several important MySQL Directories

After MySQL is installed, its database files, configuration files, and command files are not installed in the same directory as SQL Server by default. It is very important to understand these directories, especially for Linux beginners, the directory structure of Linux itself is complicated. If you cannot figure out the installation directory of MySQL, you won't be able to learn it in depth.

The following describes these directories.

1. Database directory
/Var/lib/MySQL/

2. Configuration File
/Usr/share/MySQL (MySQL. server command and configuration file)

3. Related commands
/Usr/bin (commands such as mysqladmin mysqldump)

4. Start the script
/Etc/rc. d/init. d/(directory for starting the script file MySQL)

5. Install the GUI management tool for MySQL in Ubuntu

A good graphical interface management tool for MySQL in Linux

For web development, databases are essential. A good graphic interface tool for databases can greatly improve the development efficiency. In the past, a tool named navicat was commonly used in Windows operating systems, which is very useful, but it is billed. When I switched to the Ubuntu system, I first found a mysl browser in the Ubuntu Software Center. It is not very useful, the font is too small, and the function is not strong. Later, I learned that MySQL has its own graphical interface tool workbench, which is very powerful and easy to use. Click to open the link.

Official introduction:

MySQL Workbench provides DBAs and developers an integrated tools environment:

  • Database Design & Modeling
  • SQL Development (replacing MySQL query browser)
  • Database administration (replacing MySQL administrator)
  • Database migration

The Community (OSS) edition is available from this page under
GPL.

Welcome Page

SQL Development page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.