Ubuntu12.04 Install mariadb and modify the character set to UTF-8

Source: Internet
Author: User

In fact, according to the MARIADB official website of the steps to install MARIADB special simple, just follow the steps to do, it is easy to get it done.

First, to MARIADB official website: https://downloads.mariadb.org/mariadb/repositories/#mirror =qiming&distro=ubuntu&distro_ release=precise&version=5.5

In the menu below, choose your system, version, and the version of MARIADB you want to install,

Then you will find the following specific installation steps, follow the steps to do is very simple.

My choice is Ubuntu version 12.04 LTS "precise" version of Mariadb I chose to be 5.5

And then you can follow the steps given here.

Enter the following command line in turn

sudo Install python-software-propertiessudo apt-key adv--recv-keys--keyserver HKP://  keyserver.ubuntu.com:80 0xcbcb082a1bb943dbsudo'deb/http Mirrors.hustunique.com/mariadb/repo/5.5/ubuntu Precise main'

And then enter

sudo apt-get updatesudoinstall mariadb-server

This will allow you to complete the installation.

And then enter

Mysql-h Localhost-u Root-p

Then enter your password to enter MySQL.

But the default character set for MySQL is Latin, which is garbled for Chinese, so you need to modify the character set.

You can enter show variables like "character%" under MySQL, and look at the specific character set.

Modify the file under the/ETC/MYSQL/MY.CNF can be modified,

Join under [client]: Default-character-set=utf8

Join under [mysqld]: Character-set-server=utf8

After that, save the file.

Then enter/etc/init.d/mysql restart to restart MySQL.

Entering MySQL, enter show variables like "character%"; the character set becomes UTF-8.

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.