Installation introduction under Windows: go and have a look at mysql8.018 installation introduction under Windows
Take MySQL 8.0.18, Ubuntu 16.04.6 lts (GNU / Linux 4.4.0-142-generic x86_) as an example:
A. Automatic installation
sudo apt-get install mysql-server sudo apt-get install mysql-client sudo apt-get install libmysqlclient-dev
B. Download the installation package and install the DEB file yourself
- You can download the Linux version on the official website. MySQL is divided into enterprise version and community version. Community version is free download, ordinary users can use community version, enterprise users can use enterprise version.
- Community version download address, https://dev.mysql.com/downloads/
- Select MySQL community server
Enter the download interface. If you need a historical version of MySQL, click looking for previous GA versions on the right to select the desired version of MySQL; no
Select the operating system and the operating system version on the current page, and then click download.
This paper takes Ubuntu 16.04 as an example.
Do not register to log in, skip directly.
- After downloading, download the file
mysql-server_8.0.18-1ubuntu16.04_amd64.deb-bundle.tarTo the server.
- Of course, you can download it directly under Ubuntu through WGet. Copy download link, execute,
After the server is ready to install the files, install several dependency packages required for MySQL installation.
sudo apt-get install libaio1 sudo apt-get install libmecab2 sudo apt-get install libjson-perl sudo apt-get install libnuma1
Create a temporary directory, copy the downloaded tar to the installation path, and extract it to the path
tar -xvf mysql-server_8.0.18-1ubuntu16.04_amd64.deb-bundle.tar
Start the installation (in the following order, some Debs are dependent on each other), and the remaining Debs not listed can not be installed if there is no need.
sudo dpkg -i mysql-common_8.0.18-1ubuntu16.04_amd64.deb sudo dpkg -i libmysqlclient21_8.0.18-1ubuntu16.04_amd64.deb sudo dpkg -i libmysqlclient-dev_8.0.18-1ubuntu16.04_amd64.deb sudo dpkg -i mysql-community-client-core_8.0.18-1ubuntu16.04_amd64.deb sudo dpkg -i mysql-community-client_8.0.18-1ubuntu16.04_amd64.deb sudo dpkg -i mysql-client_8.0.18-1ubuntu16.04_amd64.deb sudo dpkg -i mysql-community-server-core_8.0.18-1ubuntu16.04_amd64.deb sudo dpkg -i mysql-community-server_8.0.18-1ubuntu16.04_amd64.deb sudo dpkg -i mysql-server_8.0.18-1ubuntu16.04_amd64.deb
Note: when installing MySQL community server 8.0.18-1ubuntu16.04 amd64.deb, the following input box will pop up, prompting for the root account password.
After entering the password, the current version of MySQL will prompt you to select the encryption method related to MySQL authorization. Use strong password encryption for authentication is recommended. Using the enhanced authorization encryption method based on sha256 can better guarantee the account security.
Login authentication. Input instruction
mysql -u root -p, and then enter the password.
4. Common instructions and parameters
- Start up:
sudo service mysql start
sudo service mysql stop
- MySQL configuration storage path
/etc/mysql, you can configure and modify the default port, data storage path, log path, default encoding format, etc.
The following is the default profile
The above is a detailed explanation of mysql8.018 installation and configuration process on Linux introduced by Xiaobian. I hope it can help you. If you have any questions, please leave a message to me, and Xiaobian will reply to you in time. Thank you very much for your support of the developepaer website!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!