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 explains "Redhat 6.5 installation MySQL 5.7 steps", the explanation content in the article is simple and clear, easy to learn and understand, please follow the small series of ideas slowly in-depth, together to study and learn "Redhat 6.5 installation MySQL 5.7 steps" bar!
1. Install make compiler, the system has been installed
2. Install bison, the system has been installed
3. Install gcc-c++, the system has been installed
4. Install ncurses, the system has been installed
5, Install cmake, Download cmake-3.4.3 source package, Install
Create MySQL user groups and users
groupadd -g 300 mysql
useradd -u 300 -g mysql mysql
Unzip and install mysql
tar -zxvf mysql-5.6.35.tar.gz
cd mysql-5.6.35
cmake to compile
cmake . \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_DATADIR=/mysql/data \
-DSYSCONFDIR=/etc \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_MEMORY_STORAGE_ENGINE=1 \
-DWITH_READLINE=1 \
-DMYSQL_UNIX_ADDR=/tmp/mysqld.sock \
-DMYSQL_TCP_PORT=3306 \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DEXTRA_CHARSETS=all \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_BOOST=/usr/local/boost \
# make
# make install
8. Initialize the database
cd /usr/local/
chown -R mysql:mysql mysql
cd /usr/local/mysql/bin
./ mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/mysql/data
cd /usr/local/mysql/support-files
cp my-default.cnf /etc/my.cnf
vi /etc/my.cnf
Add the following:
[mysqld]
user=mysql
datadir=/mysql/data
default-storage-engine=MyISAM
skip-grant-tables
socket=/tmp/mysqld.sock
[client]
default-character-set=utf8
socket=/tmp/mysqld.sock
[mysql]
socket=/tmp/mysqld.sock
default-character-set=utf8
9. Add mysql startup service to system service
# cp support-files/mysql.server /etc/init.d/mysql
mysql can now be started using the following command
# service mysql start
Stop mysql service
# service mysql stop
Restart mysql service
# service mysql restart
10. Modify the root password
If you don't know the root password of the MySQL database that has just been installed, you can use the following methods to set it up
Add "skip-grant-tables" to/etc/my.cnf [mysqld] configuration section
Restart MySQL service
mysql -uroot -p login database (no password)
show databases;
use mysql;
update mysql.user set authentication_string=password('mysql') where user='root';
flush privileges;
Remove "skip-grant-tables" from/etc/my.cnf [mysqld] configuration section
Restart mysql service
service mysqld restart
Login with new password
mysql -uroot -p
Thank you for reading, the above is the "Redhat 6.5 installation MySQL5.7 steps" content, after the study of this article, I believe that we have a deeper understanding of Redhat 6.5 installation MySQL5.7 steps this problem, the specific use of the situation also needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!
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.