In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-20 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.