Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Steps to quickly install mysql5.6.35 in binary

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly gives you a brief introduction to the steps of quickly installing mysql5.6.35 in binary system. You can check the relevant professional terms on the Internet or find some related books to supplement them. We will not dabble here, so let's go straight to the topic. I hope this article on the steps of quickly installing mysql5.6.35 in binary system can bring you some practical help.

Mysql5.6.35 binary Quick installation

Mysql

Description:

Mysql is installed in the / data/mysql-5.6.35 directory

Download cd / data/wget tar-zxf mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz mv mysql-5.6.35-linux-glibc2.5-x86_64 / data/mysql-5.6.35 create a new mysql user and set permissions sudo useradd-s / sbin/nologin-M mysqlmkdir-pv / data/mysql-5.6.35/ {var Log} touch / data/mysql-5.6.35/log/error.logsudo chown-R mysql:mysql / data/mysql-5.6.35/ add environment variable: vim ~ / .bash_profileexport PATH=/data/mysql-5.6.35/bin:$PATH refresh the environment source ~ / .bash_profile initialize the database Modify the default path cd / data/mysql-5.6.35/sudo. / scripts/mysql_install_db-- basedir=/data/mysql-5.6.35/-- datadir=/data/mysql-5.6.35/data/-- user=mysql# if installed in the / usr/local/mysql/ directory, two sed are not allowed to execute Because the default is / usr/local/ directory Sudo sed-I's changeUSCR _ localUniG'Myql _ usr/bin modify the configuration file sudo rm-f by modifying sudo rm-f / etc/my.cnfsudo vim / data/mysql-5.6.35/ my.cnf [client] port = 3306socket = / tmp/ mysql.sock [mysqld] server-id = 1port = 3306basedir = / data/mysql-5.6.35datadir = / data/mysql-5.6.35/datasocket = / tmp/mysql.sockbinlog-ignore-db = mysqllog-bin = / data/mysql-5.6.35/log/mysql-bininnodb_file_per_table = 1open_files_limit = 65535sql_mode = NO_ENGINE_SUBSTITUTION STRICT_TRANS_TABLESskip-host-cacheskip-name-resolvemax_connections = 1024wait_timeout = 31536000interactive_timeout = 31536000character-set-server = utf8mb4collation-server = utf8mb4_general_ciinit_connect = 'SET NAMES utf8mb4'lower_case_table_names = 1log_error = / data/mysql-5.6.35/log/error.logslow_query_log = 1slow_query_log_file = / data/mysql-5.6.35/log/ room.log [mysqld _ safe] err-log= / data/mysql-5.6. 35/log/mysqld_safe_err.logpid-file = / data/mysql-5.6.35/var/mysqld.pid copy the service script to the / etc/init.d directory And add to the service list sudo cp support-files/mysql.server / etc/init.d/mysqld boot sudo chkconfig-- add mysqldsudo chkconfig mysqld onsudo chkconfig-- list mysqld launch mysqlsudo / etc/init.d/mysqld startps-ef | grepmysql set mysql password sudo / data/mysql-5.6.35/bin/mysqladmin-uroot password' newpassword' login mysql- uroot-p configure security policy: [root@KVM mysql-5.6.35] # sudo / Data/mysql-5.6.35/bin/mysql_secure_installationNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it, we'll need the currentpassword for the root user. Ifyou've just installed MySQL, andyou haven't set the root password yet, the password will be blank,so you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MySQLroot user without the proper authorisation. You already have a root password set, so you can safely answer'nails. Change the root password? [Y/n] n... Skipping. By default, a MySQL installation has an anonymous user, allowing anyoneto log into MySQL without having to have a user account created forthem. This is intended only fortesting, and to make the installationgo a bit smoother. You shouldremove them before moving into aproduction environment. Remove anonymous users? [Y/n] y... Success! Normally, root should only be allowed to connect from 'localhost'. Thisensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] n... Success! By default, MySQL comes with a database named 'test' that anyone canaccess. This is also intended only fortesting, and should be removedbefore moving into a production environment. Remove test database and access to it? [YBO] y-Dropping test database... ... Success!-Removing privileges on testdatabase... ... Success! Reloading the privilege tables will ensure that all changes made so farwill take effect immediately. Reload privilege tables now? [Y/n] y... Success! All done! If you've completed allof the above steps, your MySQLinstallation should now be secure. Thanks for using MySQL! Cleaning up... [root@KVM mysql-5.6.35] #

Binary quick installation of mysql5.6.35 steps to tell you here, for other related issues you want to know can continue to pay attention to our industry information. Our section will capture some industry news and professional knowledge to share with you every day.

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report