In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you "Linux how to install mysql database", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "Linux how to install mysql database" this article.
[root@szq enterprise] # rpm-ivh MySQL-client-advanced-5.6.24-1.el6.x86_64.rpm
Preparing... # [100%]
Package MySQL-client-advanced-5.6.24-1.el6.x86_64 is already installed
[root@szq enterprise] # rpm-ivh MySQL-shared-advanced-5.6.24-1.el6.x86_64.rpm
Preparing... # [100%]
1:MySQL-shared-advanced # # [100%]
[root@szq enterprise] # rpm-ivh MySQL-devel-advanced-5.6.24-1.el6.x86_64.rpm
Preparing... # [100%]
1:MySQL-devel-advanced # # [100%]
[root@szq enterprise] # rpm-ivh MySQL-server-advanced-5.6.24-1.el6.x86_64.rpm
Preparing... # [100%]
File / usr/share/mysql/czech/errmsg.sys from install of MySQL-server-advanced-5.6.24-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.x86_64
File / usr/share/mysql/danish/errmsg.sys from install of MySQL-server-advanced-5.6.24-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.x86_64
File / usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-advanced-5.6.24-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.x86_64
File / usr/share/mysql/english/errmsg.sys from install of MySQL-server-advanced-5.6.24-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.x86_64
File / usr/share/mysql/estonian/errmsg.sys from install of MySQL-server-advanced-5.6.24-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.x86_64
File / usr/share/mysql/french/errmsg.sys from install of MySQL-server-advanced-5.6.24-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.x86_64
File / usr/share/mysql/german/errmsg.sys from install of MySQL-server-advanced-5.6.24-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.52-1.el6_0.1.x86_64
There are a lot of errors reported here. In fact, it is because the system already has the mysql-libs package, which can be checked and verified:
[root@szq enterprise] # rpm-qa | grep mysql-libs
Mysql-libs-5.1.52-1.el6_0.1.x86_64
Uninstall the existing installation package before installing the new package:
[root@szq enterprise] # rpm-e mysql-libs-5.1.52-1.el6_0.1.x86_64
Error: Failed dependencies:
Libmysqlclient.so.16 () (64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
Libmysqlclient.so.16 (libmysqlclient_16) (64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
Mysql-libs is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
[root@szq enterprise] #
Here, because of the dependency, the error is reported, and we choose to ignore the "--nodeps" option of the dependency, and the uninstall will be successful!
[root@szq enterprise] # rpm-e-- nodeps mysql-libs-5.1.52-1.el6_0.1.x86_64
[root@szq enterprise] #
[root@szq enterprise] # rpm-ivh MySQL-server-advanced-5.6.24-1.el6.x86_64.rpm
Preparing... # [100%]
1:MySQL-server-advanced # # [100%]
2016-03-28 14:58:36 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use-explicit_defaults_for_timestamp server option (see documentation for more details).
2016-03-28 14:58:36 0 [Note] / usr/sbin/mysqld (mysqld 5.6.24-enterprise-commercial-advanced) starting as process 27331.
2016-03-28 14:58:36 27331 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-03-28 14:58:36 27331 [Note] InnoDB: The InnoDB memory heap is disabled
2016-03-28 14:58:36 27331 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-03-28 14:58:36 27331 [Note] InnoDB: Memory barrier is not used
2016-03-28 14:58:36 27331 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-03-28 14:58:36 27331 [Note] InnoDB: Using Linux native AIO
2016-03-28 14:58:36 27331 [Note] InnoDB: Not using CPU crc32 instructions
2016-03-28 14:58:36 27331 [Note] InnoDB: Initializing buffer pool, size = 128.0m
2016-03-28 14:58:36 27331 [Note] InnoDB: Completed initialization of buffer pool
2016-03-28 14:58:36 27331 [Note] InnoDB: The first specified data file. / ibdata1 did not exist: a new database to be created!
2016-03-28 14:58:36 27331 [Note] InnoDB: Setting file. / ibdata1 size to 12 MB
2016-03-28 14:58:36 27331 [Note] InnoDB: Database physically writes the file full: wait...
2016-03-28 14:58:36 27331 [Note] InnoDB: Setting logfile. / ib_logfile101 size to 48 MB
2016-03-28 14:58:41 27331 [Note] InnoDB: Setting logfile. / ib_logfile1 size to 48 MB
2016-03-28 14:58:56 27331 [Note] InnoDB: Renaming logfile. / ib_logfile101 to. / ib_logfile0
2016-03-28 14:58:56 27331 [Warning] InnoDB: New log files created, LSN=45781
2016-03-28 14:58:56 27331 [Note] InnoDB: Doublewrite buffer not found: creating new
2016-03-28 14:58:57 27331 [Note] InnoDB: Doublewrite buffer created
2016-03-28 14:58:57 27331 [Note] InnoDB: 128rollback segment (s) are active.
2016-03-28 14:58:57 27331 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-03-28 14:58:57 27331 [Note] InnoDB: Foreign key constraint system tables created
2016-03-28 14:58:57 27331 [Note] InnoDB: Creating tablespace and datafile system tables.
2016-03-28 14:58:57 27331 [Note] InnoDB: Tablespace and datafile system tables created.
2016-03-28 14:58:57 27331 [Note] InnoDB: Waiting for purge to start
2016-03-28 14:58:57 27331 [Note] InnoDB: 5.6.24 started; log sequence number 0
2016-03-28 14:58:57 27331 [Note] RSA private key file not found: / var/lib/mysql//private_key.pem. Some authentication plugins will not work.
2016-03-28 14:58:57 27331 [Note] RSA public key file not found: / var/lib/mysql//public_key.pem. Some authentication plugins will not work.
A random root password has been set. You will find it in'/ root/.mysql_secret'.
2016-03-28 14:58:58 27331 [Note] Binlog end
2016-03-28 14:58:58 27331 [Note] InnoDB: FTS optimize thread exiting.
2016-03-28 14:58:58 27331 [Note] InnoDB: Starting shutdown...
2016-03-28 14:59:01 27331 [Note] InnoDB: Shutdown completed; log sequence number 1625977
2016-03-28 14:59:01 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use-explicit_defaults_for_timestamp server option (see documentation for more details).
2016-03-28 14:59:01 0 [Note] / usr/sbin/mysqld (mysqld 5.6.24-enterprise-commercial-advanced) starting as process 27353.
2016-03-28 14:59:01 27353 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-03-28 14:59:01 27353 [Note] InnoDB: The InnoDB memory heap is disabled
2016-03-28 14:59:01 27353 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-03-28 14:59:01 27353 [Note] InnoDB: Memory barrier is not used
2016-03-28 14:59:01 27353 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-03-28 14:59:01 27353 [Note] InnoDB: Using Linux native AIO
2016-03-28 14:59:01 27353 [Note] InnoDB: Not using CPU crc32 instructions
2016-03-28 14:59:01 27353 [Note] InnoDB: Initializing buffer pool, size = 128.0m
2016-03-28 14:59:01 27353 [Note] InnoDB: Completed initialization of buffer pool
2016-03-28 14:59:01 27353 [Note] InnoDB: Highest supported file format is Barracuda.
2016-03-28 14:59:01 27353 [Note] InnoDB: 128rollback segment (s) are active.
2016-03-28 14:59:01 27353 [Note] InnoDB: Waiting for purge to start
2016-03-28 14:59:01 27353 [Note] InnoDB: 5.6.24 started; log sequence number 1625977
2016-03-28 14:59:01 27353 [Note] RSA private key file not found: / var/lib/mysql//private_key.pem. Some authentication plugins will not work.
2016-03-28 14:59:01 27353 [Note] RSA public key file not found: / var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2016-03-28 14:59:01 27353 [Note] Binlog end
2016-03-28 14:59:01 27353 [Note] InnoDB: FTS optimize thread exiting.
2016-03-28 14:59:01 27353 [Note] InnoDB: Starting shutdown...
2016-03-28 14:59:03 27353 [Note] InnoDB: Shutdown completed; log sequence number 162598
A 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 strongly recommended 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 by default by the server when you start it.
You may edit this file to change server settings
[root@szq enterprise] # cat / root/.mysql_secret
# The random password set for the root user at Mon Mar 28 14:58:58 2016 (local time): RK_wpPXYQ7MTjbZy
[root@szq enterprise] # / 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 the root user. If you've just installed MySQL, and
You 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 MySQL
Root user without the proper authorisation.
You already have a root password set, so you can safely answer'nails.
Change the root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MySQL installation has an anonymous user, allowing anyone
To log into MySQL without having to have a user account created for
Them. This is intended only for testing, and to make the installation
Go a bit smoother. You should remove them before moving into a
Production 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 a production environment.
Remove test database and access to it? [Y/n] y
-Dropping test database...
... Success!
-Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
Will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
All done! If you've completed all of the above steps, your MySQL
Installation should now be secure.
Thanks for using MySQL!
Cleaning up...
[root@szq enterprise] # mysql-pmysql123 (the lowercase p is followed directly by the password and cannot have a space. If there is a space, it is considered to be db name. Other parameters are not required, with or without spaces.)
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with; or\ g.
Your MySQL connection id is 16
Server version: 5.6.24-enterprise-commercial-advanced MySQL Enterprise Server-Advanced Edition (Commercial)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be trademarks of their respective
Owners.
Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
Mysql >
The above is all the contents of the article "how Linux installs mysql database". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.