Install Mysql in Linux and mysql in linux
First, let's talk about Linux. I have to clean it. It's really a headache to use it through command lines. Many people say that I have enough Linux servers with the lowest configuration, but I really feel that it is not convenient to configure Windows from the east to the west. It is also a strange problem in the early stage, it is hard to say that good people want to experience the pleasure of solving problems?
Okay, no more.
Download mysql download is very convenient, use the command: wget-c http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-5.6.24-1.linux_glibc2.5.x86_64.rpm-bundle.tar-c that supports resumable data transfer, there can be a lot of related parameters, there is a need to check the installation of decompressed bundle.tar, use: tar-xvf MySQL-5.6.24-1.linux_glibc2.5.x86_64.rpm-bundle.tar-x execution-f must be extracted out will appear a few Mysql installation package, of course, server and client is required, I will install all the installation packages, run the command: yum install MySQL -*. rpm -- nogpgcheck indicates no signature issue. If this option is not available, I often report that there is no Public Key. Wait for installation... (enter yes). Note that there will be a lot of useful logs during installation. I naively thought that the default password for Mysql is empty, and many of them are on the Internet. Where is the password empty? I tried it many times but it was not correct. I installed it many times and found that the installation process log generated a random password, which was stored in/root/. mysql_secret. Okay. Copy the password and log on to Mysql. Mysql-uroot-p and then enter the random password. After you enter the system for the first time, if you use the relevant database, you will be prompted to set a new password. Set password = PASSWORD ('new password'); to deploy a project, GRANT Mysql> grant all privileges on *. * TO 'root' @ '%' identified by 'youpassword' with grant option; flush privileges; (don't forget TO refresh) The war package for deploying tomcat will not be mentioned, the problem is that my database uses localhost and the password is always prompted to expire. I found the user table in the mysql database: select host, password_expired where user = 'root' and found that some of the passwords actually expired and updated: update user set password_expired = 'n' where user = 'root'. Then, I want to witness the miracle. However, the password is still prompted to expire because I still use localhost. Then I tried to find a solution online, but it never met. I can change localhost to my Internet Ip address. Finally, on the server, I use
After logging on to mysql from mysql-h 127.0.0.1-uroot-p, I plan to check the mysql DATA table. You can prompt me to set the password. Have you set the password? I reset the PASSWORD, SET PASSWORD = password ('new password ').
Actually, it's okay. What the mother fucker! This is the first time you have configured a Linux server. In this episode, I used the Huawei cloud Linux server. After the incorrect password was entered, I locked my ip address and couldn't log on. 1. Set the new port number for ssh. The default value is 22. 2. log in with another ip address and remove the ip address locked in hosts. deny.