installation, configuration and use of MySQL5.7 on Ubuntu

Source: Internet
Author: User
Tags mysql version

Preface the installation of things on the server has always been a headache to me, the reason: Linux Foundation is not good. Install MySQL trampled a lot of pits, around a lot of detours, this step is the TAR package installed pit ... Of course, it has nothing to do with the tar package ...

Environment:

Ubuntu 14.04.5 LTS (gnu/linux 4.2.0-27-generic x86_64)

Pending Installation: MySQL5.7 version

First, install 1, download the MYSQL-APT configuration package, and install
wget Https://dev.mysql.com/get/mysql-apt-config_0.8.1-1_all.debsudo dpkg-i Mysql-apt-config_0.8.1-1_all.deb

During the installation process, you will be asked to select the MySQL version, select the mysql5.7 version and click "OK".

2. Update Apt-get Index
sudo apt-get update
3, install the database, during the installation process, will automatically uninstall the old version of the installed data
sudo apt-get install Mysql-server
4. Restart MySQL, and detect the installation and configuration
sudo service MySQL restartmysql-u root-p

Enter the account password you set previously

5. Where does your MySQL installation go?

6. Command

#进入MySQL: Mysql-u root-p

#启动: sudo service mysql start

#重启: sudo service mysql restart

#关闭: sudo service mysql stop

Second, the configuration

Before I met the character_set_server/character_set_database non-utf-8 situation. Causes data write errors.

Modify the MySQL configuration file (/et/mysql/my.cnf) as follows:

[Client]default_character_set=utf8[mysql]default_character_set=utf8[mysqld]character_set_server=utf8

  

installation, configuration and use of MySQL5.7 on 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.