In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Download and upload mysql-5.7.14.tar.gz view plain copy
tar -zxf msql-5.7.14.tar.gz
2. Install dependency package view plain copy
yum -y install gcc gcc-c++ ncurses ncurses-devel cmake
3. Download Boost library view plain copy
wget http://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz
4. Add user view plain copy
groupadd mysql
useradd -r -g mysql -s /bin/false mysql
5. view plain copy
cmake . \
-DCMAKE_INSTALL_PREFIX=/application/mysql-5.7.14 \
-DMYSQL_DATADIR=/application/mysql-5.7.14/data \
-DDOWNLOAD_BOOST=1 \
-DWITH_BOOST=/software/boost_1_59_0 \
-DMYSQL_UNIX_ADDR=/application/mysql-5.7.14/tmp/mysql.sock \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DENABLED_LOCAL_INFILE=ON \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_FEDERATED_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
-DWITHOUT_PARTITION_STORAGE_ENGINE=1 \
-DWITH_FAST_MUTEXES=1 \
-DWITH_ZLIB=bundled \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_READLINE=1 \
-DWITH_EMBEDDED_SERVER=1 \
-DWITH_DEBUG=0
6. view plain copy
make
make install
7. modify/etc/my.cnf view plain copy
[mysqld]
datadir=/application/mysql/data
socket=/application/mysql/tmp/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
character_set_server=utf8
8. modify permissions view plain copy
chown -R mysql:mysql mysql-5.7.14/
9. Create database directory view plain copy
mkdir data
chown mysql:mysql data
10. Initialize view plain copy
bin/mysqld --initialize --user=mysql --basedir=/application/mysql --datadir=/application/mysql/data
11. Set encrypted connection view plain copy
bin/mysql_ssl_rsa_setup
12. Join System Services view plain copy
cp support-files/mysql.server /etc/init.d/mysqld
Modify the basedir datadir attribute in mysqld file
chkconfig mysqld on #Set boot to boot
chkconfig --list | grep mysqld
13. Start Restart Stop View Plain Copy
service mysqld start
service mysqld restart
service mysqld stop
14. Log in and change the initial password copy
SET PASSWORD FOR 'root'@'localhost'=PASSWORD('newpassword');
Problems encountered during installation view pcopy
Starting MySQL... ERROR! The server quit without updating PID file (/application/mysql/Rong.pid).
1. The requested URL/var/log/mysqld.log was not found on this server.
[ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2. Reason: When initializing the database permission table, the permission table created by default is under the default directory/usr/local/mysql/var, but actually it is in/application/mysql/data.
3. To solve the problem, change the--datadir parameter under/etc/my.cnf
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.