MySQL installation and precautions under Ubuntu

Source: Internet
Author: User

First, installation

Linux installed in a variety of ways, you can use the Package Manager to install automatically, you can manually compile the source code installation, the use of relatively simple installation, using Apt-get:

sudo apt-get install Mysql-server

The service starts automatically when the installation is complete.

Detection service Process Status:

Ps-aux|grep MySQL

Start/close/reboot/Status View (Command same parameter):

Sudo/etc/init.d/mysql Start/stop/restart/status

Using the MySQL command client:

Mysql-u User name-P

Second, the matters needing attention

1. Coding

View encoding

After entering the command:

Show variables like '%char% ';

The result is that database or server is latin1 and internationalization needs to be modified to UTF8

Edit MySQL configuration file located in/etc/mysql/my.conf

Locate the [MYSQLD] node and add the following code

Character-set-server = UTF8

collation-server = utf8_general_ci

Restart MySQL

2, MySQL under the case of Linux sensitive issues

MySQL is case-insensitive under Windows, but there are case-sensitive cases under Linux, with the following rules:

A, database name and table name are strictly case-sensitive;

b, the table alias is strictly case-sensitive;

C, column name and column alias ignore case;

d, variable names are strictly case-sensitive;

If you are concerned about database migration problems with Windows to Linux, you can modify the casing rules for MySQL:

Add under the configuration file [mysqld] Node

Lower_case_table_names = 1

Description: 0-Case Sensitivity 1-case insensitive

3, under Linux also has the MySQL client, for example Navicat for MySQL

MySQL installation and precautions under Ubuntu

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.