In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the use of yum under linux to install mysql, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
Use yum to install mysql under linux
-- the version of mysql installed is mysql55-mysql-server.x86_64
1. Installation
Check to see if it has been installed:
Yum list installed mysql*
Rpm-qa | grep mysql*
Check to see if the package is installed:
Yum list mysql*
Install the mysql client: server installation can be omitted by simply installing the server
Yum install mysql
Install the mysql server side:
Yum install mysql55-mysql-server.x86_64
2. Start & stop
Database character set Settings
Add default-character-set=utf8 to mysql configuration file / etc/my.cnf
Start the mysql service:
/ etc/init.d/mysql55-mysqld start
Boot:
Chkconfig mysql55-mysqld on, check whether the boot setting is successful chkconfig-- list | grep mysql*
Mysqld 0: off 1: off 2: enable 3: enable 4: enable 5: enable 6: close
Stop:
Service mysql55-mysqld stop
2. Log in
It is necessary to start mysqld service mysql55-mysqld restart.
Create a root administrator:
Mysqladmin-u root password 123456
Www.2cto.com
Login:
Mysql-u root-p enter the password.
Forget your password:
Service mysql55-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
# Building a database
Create database zxlh default character set utf8
3. Remote access
-- create users and only access / zxlh database
Grant all PRIVILEGES on zxlh.* to 'zxlh'@'%' identified by' zxlh223456'
# Local users
Grant all PRIVILEGES on zxlh.* to 'zxlh'@'localhost' identified by' zxlh223456'
-- create users and access all databases
Grant all PRIVILEGES on *. * to 'root'@'%' identified by' zxlh223456' WITH GRANT OPTION
Port number of the open firewall
4. Several important directories of Linux MySQL
Database directory
/ var/lib/mysql/
Configuration file
/ usr/share / mysql (mysql.server commands and configuration files)
Related command
/ usr/bin (mysqladmin mysqldump, etc.)
Startup script
/ etc/rc.d/init.d/ (directory of startup script file mysql)
Commands out of sync; you can't run this command now
Just shut down the process again.
Thank you for reading this article carefully. I hope the article "installing mysql with yum under linux" shared by the editor will be helpful to everyone. At the same time, I also hope you can support us and pay attention to the industry information channel. More related knowledge is 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.