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