In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the linux online installation mysql method, has a certain reference value, the need for friends can refer to the next. I hope you all have a lot to gain after reading this article. Let's take a look at it together.
Linux online installation mysql method: first install wget software package in linux; then install mysql through yum install command; finally restart mysql service through "service mysqld restart".
The general idea is as follows:
1.wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
wget is a tool for downloading files, a combination of World,Wide.Web and get, which is used on the command line. It is an essential tool for Linux users, especially network administrators, who often download software or restore backups from remote servers to local servers. If we were to use virtual hosting, we would have to download this from a remote server to our computer disk and then upload it to the server using xftp. Wget can be downloaded directly to the server without uploading, which saves time. Usage conditions: wget can support HTTP,HTTPS,FTP download method: wget [parameter] [URL]
Parameter: RUL address omitted here: is the path you requested, Download to/root directory by default, Save the file with the original file name, You can also reset your own possible problems: -bash: wget: command not found
Source of the problem: Linux does not install wget package Solution: Run the command: yum -y install wget, the explanation of this statement will be discussed below
2.rpm -ivh mysql-community-release-el7-5.noarch.rpm
Explanation: rpm command is RPM package management tool, similar to Windows inside the "add/delete programs" use method: rmp [options] [parameters]
Options: -ivh is written here, indicating that installation progress is displayed during installation Parameters: is the name of the rmp package to be operated, here is the mysql-community-release-el7 -5.noarch.rpm file downloaded in the first step
3. yum install mysql-community-server can also be downloaded to the specified directory: yum install mysql-community-server -y --downloadir =/usr/local/src
Explanation: RPM package management based package manager, can automatically download rmp packages from the specified server and install, can automatically handle dependencies, and install all dependent packages at once, without downloading and installing them again and again. Yum provides commands to find, install, and delete a particular package, group, or even all of them. Use method: yum[option][command][package name] command: I use install download package name: I use mysql-community-server, that is, specify the package to download
This happens completely! This MySQL database has been successfully installed.
4.service mysqld restart
Explanation: Restart MySQL service
5.mysql -u root
Explanation: Enter MySQ database, enter, first login is without password
If you want to set a password, you can then enter: mysql -u root -p;, you will be prompted to enter the password you want to set, then enter the password you want to set
Another way to set passwords:
use mysqlupdate user set password=password('123456') where user='root';flush privileges;
exit;
It seems that my first method did not succeed. I used the second method. When logging in with my password, I entered: mysql -u root -p;. You can try both.
[Note]
mysql is case-sensitive in linux. To be case-insensitive, you can modify the my.cnf configuration file (which can be found by whereis my.cnf) and add lower_case_table_names=1 under the [mysqld node].
MySQL database and table operations in linux
Thank you for reading this article carefully, hope Xiaobian share linux online installation mysql method content is helpful to everyone, but also hope that everyone more support, pay attention to the industry information channel, encounter problems to find, detailed solutions waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.