You can install and deploy MySQL by using Centos7. Think I can also join the group to urge learning to discuss technology. QQ group: 1076570504 personal learning database http://www.aolanghs.com/ wechat public number search [Huanshao growth path]

Install MySQL

As described in the previous article, we have added a Linux image from the virtual machine and configured the IP address, gateway (for external Xshel connection). Enter the following command to start installing MySQL.

In Linux, there is a protection for entering a password, so you can’t see it already entered

Wget installed

Wget must be used in the first command operation, so wGET must be installed in Centos first

yum install wget
Copy the code

Generate install MySQL directive

The instructions generated by the installed service are copied directly into xshell by configuring the following links

Automatic generation of Linux command https://oneinstack.com/auto/ (more tools to www.aolanghs.com)

Second, application and verification

  • Initialized MySQL
mysqld --initialize

Copy the code
  • Start the MySQL
systemctl start mysqld
Copy the code
  • Check the MySQL running status
systemctl status mysqld
Copy the code
  • Verify MySQL installation
mysqladmin --version
Copy the code
  • Check whether the port is open properly (Preparations before connection)
netstat -tlunp
Copy the code

  • Log on to the MySQL
mysql -u root -p
Copy the code

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'WITH GRANT OPTION' Do not restart Flush PRIVILEGESCopy the code

MySQL common commands

Energy is limited, commonly used commands, please go to http://www.voidcn.com/article/p-shalirfu-bxp.html in this article

Energy is limited, commonly used commands, please go to https://blog.csdn.net/u013337889/article/details/48679911 in this article

Energy is limited, commonly used commands, please go to https://www.cnblogs.com/bsw-zhen/p/11022999.html in this article

4. Install Redis

  • Check if Redis exists
redis-server --version
Copy the code

  • After the first installation, copy the configuration to Xshell

Automatic generation of Linux command https://oneinstack.com/auto/ (more tools to www.aolanghs.com)

5. Application and verification

Start Redis a SAO operation into Redis directory

  • Conf configuration files are stored under etc. Press I to enter the editing mode. After editing, press Esc to exit the editing mode and enter :wq to save the configuration

  • There is a case where you forget to modify the data, but it has been started (note)
Query the current Redis process ID ps - aux | grep Redis kill kill process code to run. / Redis server. -Copy the code

Wechat public attention, not lost oh!

The more you know, the more you don’t know. Find the right direction, adhere to their own positioning! Keep moving forward, there will be a bright future in the end! Creation is not easy, your support is the biggest recognition for me! This article will continue to be updated, and we’ll see you next time! QQ group: 1076570504 wechat public number search “huan little growth road” please support more!