In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
I. installation environment
1. Operating system version: Red Hat Enterprise Linux Server release 6.5 (Santiago)
2. Mysql version: MySQL-5.6.38-1.el6.x86_64.rpm-bundle.tar
II. Installation instructions
Many materials on the Internet will uninstall the mysql-libs that comes with the system before using the rpm package to install Mysql 5.6.But some materials use yum remove mysql, but this will also uninstall the eight packages that depend on mysql-libs, including postfix, crontab and other software packages, resulting in unloading for unexpected purposes. Some materials use rpm-e-nodeps mysql-libs to avoid uninstalling other software packages that rely on mysql-libs. However, it is not entirely correct. Mysql-shared-compat provided by Mysql is the rpm package that replaces mysql-libs. You should install this package before uninstalling mysql-libs separately. The official instructions are as follows:
After decompressing MySQL-5.6.38-1.el6.x86_64.rpm-bundle.tar, you can see that multiple rpm package files are included.
Many materials on the Internet choose to install Mysql-server, Mysql-client and Mysql-devel packages, but in fact, the role of Mysql-devel is if you need to compile other mysql clients such as perl mysql modules or intend to compile C API applications, in fact, in most cases, the standard installation does not need to install Mysql-devel, only according to Mysql-server and Mysql-client, this is the installation. The official website is as follows:
III. Installation process
1. Install Mysql-shared-compat first, and then uninstall mysql-libs separately.
2. Install mysql-server, according to the prompts, the random password after installation is / root/.mysql_secret, and you can run the Security configuration Wizard / usr/bin/mysql_secure_installation, and the configuration file is in / usr/my.cnf (copy to / etc/my.cnf as usual)
[root@node01mysqlrpm] # rpm-ivh MySQL-server-5.6.38-1.el6.x86_64.rpmwarning:MySQL-server-5.6.38-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID5072e1f5: NOKEYPreparing... # [100%] 1:MySQL-server # [100%] warning: user mysqldoes not exist-using rootwarning: group mysqldoes not Exist-using rootwarning: user mysqldoes not exist-using rootwarning: group mysqldoes not exist-using root2017-10-28 20 using rootwarning 57 exist 240 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use--explicit_defaults_for_timestamp server option (see documentation for moredetails). 2017-10-28 20 Ignoring-- secure-file-priv value as server is running with-- bootstrap.2017-10-28 20 Ignoring-- secure-file-priv value as server is running with-- bootstrap.2017-10-28 20 Ignoring-- secure-file-priv value as server is running with-- bootstrap.2017-10-28 20 Ignoring 57 InnoDB 240 [Note] / usr/sbin/mysqld (mysqld 5.6.38) starting as process 8869... 2017-10-28 20 Note 57 24 8869 [Note] InnoDB: Using atomics to ref count buffer pool pages2017-10-28 20 Ignoring 57 24 8869 [Note ] InnoDB: The InnoDB memory heap is disabled2017-10-28 20 InnoDB 57 Note 248869 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins2017-10-28 20 InnoDB 57 248869 [Note] InnoDB: Memory barrier is not used2017-10-28 20 Note 57 248869 [Note] InnoDB: Compressed tables use zlib 1.2.32017-10-28 20 Note 57 248869 [Note] InnoDB: Using Linux native AIO2017-10-28 20 Note 57 248869 [Note] InnoDB: Using CPU crc32 instructions2017-10-28 20 InnoDB 5724 8869 [Note] InnoDB: Size = 128.0M2017-10-28 20 InnoDB 57 Note 248869 [Note] InnoDB: Completed initialization of buffer pool2017-10-28 20 InnoDB 57 24 8869 [Note] InnoDB: The first specified data file. / ibdata1 did not exist: anew database to be created57 24 8869 [Note] InnoDB: Setting file. / ibdata1 size to 12 MB2017-10-28 20 20 InnoDB 57 24 8869 [Note] InnoDB: Database physically writes the file full: wait...2017-10-28 20 20 Suzhou 57 24 8869 [Note] InnoDB: Setting logfile. / ib_logfile101 size to 48 MB2017-10-28 20 InnoDB: Setting logfile. / ib_logfile1 size to 48 MB2017-10-28 20 InnoDB: Setting logfile. / ib_logfile1 size to 48 MB2017-10-28 20 Setting logfile. [Note] InnoDB: Renaming logfile. / ib_logfile101 to. / ib_logfile02017-10-28 20 ib_logfile101 to. [Warning] InnoDB: New log files created LSN=457812017-10-28 20 are active.2017 57 Doublewrite buffer not found: creating new2017-10-28 20 InnoDB 278869 [Note] InnoDB: Doublewrite buffer created2017-10-28 20 Doublewrite buffer not found 57 are active.2017 278869 [Note] InnoDB: 128 rollback segment (s) are active.2017-10-28 2057 are active.2017-28 278869 [Warning] InnoDB: Creating foreign key constraint system tables.2017-10-28 20 Doublewrite buffer not found 57 are active.2017-27 8869 [Note] InnoDB: Foreign key constraint system tables created2017-10-28 20 are active.2017 57 Note: Creating: Tablespace and datafile system tables.2017-10-28 20 InnoDB: Tablespace and datafile system tables created.2017-10-28 20 InnoDB: Note: 278869 [Note] InnoDB: Waiting for purge to start2017-10-28 20 InnoDB: 278869 [Note] InnoDB: 5.6.38 started Log sequence number 0A random root password has been set. You will find itin'/ root/.mysql_secret'.2017-10-28 20 InnoDB: Shutdown completed; log sequence number 1625977 2017-10-28 20 InnoDB: Shutdown completed; log sequence number 16259772017-10-28 20 InnoDB: Shutdown completed; log sequence number 16259772017-10-28 20V 57 Note 288869 [Note] InnoDB: FTS optimize thread exiting.2017-10-28 20 Note 57 InnoDB: Shutdown completed; log sequence number 16259772017-10-28 20 V 57 InnoDB 298869 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use--explicit_defaults_for_timestamp server option (see documentation for moredetails). 2017-10-28 20 Ignoring 57 Note [Note] / usr/sbin/mysqld (mysqld 5.6.38) starting as process 8891... 2017-10-28 20 Ignoring 57298891 [Note] InnoDB: Using atomics to ref count buffer pool pages2017-10-28 20 Suzhou 57298891 [Note ] InnoDB: The InnoDB memory heap is disabled2017-10-28 20 Note 57 InnoDB [Note] InnoDB: Memory barrier is not used2017-10-28 20 InnoDB 57298891 [Note] InnoDB: Compressed tables use zlib 1.2.32017-10-28 20 Compressed tables use zlib 57298891 [Note] InnoDB: Using Linux native AIO2017-10-28 20 InnoDB 57 Note 298891 [Note] InnoDB: Using CPU crc32 instructions2017-10-28 20 InnoDB 57298891 [Note] Initializing buffer pool: Size = 128.0M2017-10-28 20 InnoDB 57 rollback segment 298891 [Note] InnoDB: Completed initialization of buffer pool2017-10-28 20 InnoDB 57 are active.2017 298891 [Note] InnoDB: Highest supported file format is Barracuda.2017-10-28 20 InnoDB 57 298891 [Note] InnoDB: 128 rollback segment (s) are active.2017-10-28 2057 298891 [Note] InnoDB: Waiting for purge to start2017-10-28 20 InnoDB 57 Note] InnoDB: 5.6.38 started Log sequence number 16259772017-10-28 20 Binlog end2017 57 Shutdown completed; log sequence number 298891 [Note] InnoDB: FTS optimize thread exiting.2017-10-28 20 V 57 Shutdown completed; log sequence number 298891 [Note] InnoDB: Starting shutdown...2017-10-28 20 V 57 Shutdown completed; log sequence number 318891 [Note] InnoDB: Shutdown completed; log sequence number 1625987A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER! You will find that password in'/ root/.mysql_secret'. You must change that password on your first connect,no other statement but 'SET PASSWORD' will be accepted.See the manual for the semantics of the' password expired' flag. Also, the account for the anonymous user has been removed. In addition, you can run: / usr/bin/mysql_secure_installation which will also give you the option of removing the test database.This is stronglyrecommended for production servers. See the manual for more instructions. Please report any problems at http://bugs.mysql.com/ The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at http://shop.mysql.com New default config file was created as / usr/my.cnf and will be used bydefault by the server when you start it.You may edit this file to change server settings
3. Install Mysql-client
4. Copy my.conf and start the service
[root@node01 mysqlrpm] # cp / usr/my.cnf / etc/my.cnf
5. The directory structure of the installed RPM package is as follows:
Initialize the configuration Mysql and log in to the database
1, a lot of information on the Internet after the RPM installation of Mysql 5.6 also performed / usr/bin/mysql_install_db for initialization installation but the security configuration wizard did not run, in fact, in Mysql 5.6.8, with RPM package new installation will call / usr/bin/mysql_install_db and with random password parameters, so there is no need to execute mysql_install_db, but run the security configuration wizard is necessary. The official website states as follows:
2, run the Security configuration Wizard, because you need to enter the root password, so first check the randomly generated password file.
[root@node01 ~] # cat / root/.mysql_secret# The random password set for the root user at Sat Oct 28 20:57:28 2017 (local time): LyE_R5rVp7p1vLMe
The Security configuration Wizard mainly does the following:
A) whether to set a password for root users
B) whether to delete anonymous accounts
C) whether to cancel remote login for root users
D) whether to delete the test library and access to the test library
E) whether to refresh the authorization table to make the changes effective
[root@node01 ~] # cat / root/.mysql_secret# The random password set for the root user at Sat Oct 28 20:57:28 2017 (local time): LyE_ R5rVp7p1vLMe[ root @ node01 ~] # / usr/bin/mysql_secure_installation NOTE: 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 current password for theroot user. If you've just installed MySQL, andyou haven't set the root password yet, thepassword will be blank,so you should just press enter here. Enter current password for root (enter for none): OK, successfullyused 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] yNew password:Re-enter newpassword:Password updatedsuccessfully!Reloading privilege tables.. ... Success! By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQLwithout having to have a user account created for them. This is intended only for testing, and tomake the installation go a bit smoother. You should remove them before moving into aproduction environment. Remove anonymous users? [Y/n] y... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] n... Skipping. By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into aproduction environment. Remove test database and access to it? [Y/n] n... Skipping. Reloading the privilege tables will ensure that all changes made so far will take effectimmediately. Reload privilege tables now? [Y/n] y... Success! All done! If you've completed all of the above steps,your MySQL installation shouldnow be secure. Thanks for using MySQL! Cleaning up...
3. Log in to the database and confirm that the installation is completed successfully.
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.