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)05/31 Report--
Today I will talk to you about how to use yum to install mysql in linux. Many people may not know much about it. In order to let everyone know more, Xiaobian summarized the following contents for everyone. I hope everyone can gain something according to this article.
Install mysql using yum under linux
1. Installation
Check if it has been installed:
yum list installed mysql*
rpm -qa | grep mysql*
Check to see if there are any packages installed:
yum list mysql*
Install mysql client:
yum install mysql
Install MySQL Server:
yum install mysql-server
yum install mysql-devel
www.2cto.com
2. Start & Stop
Database Character Set Settings
Add default-character-set=utf8 to mysql configuration file/etc/my.cnf
Start mysql service:
The requested URL/etc/init.d was not found on this server.
Power on:
chkconfig -add mysqld, Check whether the boot settings are successful chkconfig --list| grep mysql*
mysqld 0: Off 1: Off 2: On 3: On 4: On 5: On 6: Off
Stop:
service mysqld stop
2. Log in
Create root administrator:
mysqladmin -u root password 123456
www.2cto.com
Login:
mysql -u root -p Enter your password.
Forgot password:
service mysqld stop
mysqld_safe --user=root --skip-grant-tables
mysql -u root
use mysql
update user set password=password("new_pass") where user="root";
flush privileges;
3. Remote access
Port number of open firewall
mysql add permissions: mysql library user table adds a new record host is "%", user is "root".
4. Several important directories of MySQL
www.2cto.com
directory
/var/lib//
profile
/usr/share /mysql (mysql.server command and configuration file)
related commands
/usr/bin (mysqladmin mysqldump, etc.)
startup script
/etc/rc.d/init.d/(directory of startup script file mysql)
After reading the above, do you have any further understanding of how to install mysql using yum in linux? If you still want to know more knowledge or related content, please pay attention to the industry information channel, thank you for your support.
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.