linux install mysql under (rpm Installation)
Database download package:
https://www.mysql.com/downloads/
Open the original agreement in the community of open source GPL version inside Download
We use mysql community server inside
Which is the client workbench tool
MySQL Cluster is an oracle out of their own version of the cluster (it integrates a number of open source tools and value-added services)
Select the operating system and version
It recommended to install in linux
You can also select the version
Download the server package and client packages
If a server package, architecture diagram of the things that have a
Also next client utilities packet, the client packages, similar connection layer
After downloading the inside spread centos linux system with command rz
rpm is the package manager
xshell can directly drag
Rz command can also be used, if not install it: yum install lrzsz
yum is the Package Explorer, the problem can be solved package dependencies, the package needs to have downloaded
Spread linux system
Install mysql steps:
Environmental clean-up
centos7 will own a mariadb
To see if you have installed
rpm -qa |grep -i mysql
rpm -qa | grep -i mariadb (centos7 default system comes)
mariadb mysql come from, is one of its branches, need to be cleaned out
Clean out mariadb package
Yum install you directly, then use the yum source mariadb, which is not the same with mysql official version, we have to install the official version, you need to clear out mariadb, and then manually install their own official version of mysql download
rpm -e plus package name, the package cleared mariadb
Rpm can be seen with the deletion will fail, suggesting the need to install software dependencies
rpm -e mariadb-libs-5.5.56-2.el7.x86_64
When rpm deleted if there are dependencies, you can use yum remove + package name to delete mariadb
start installation:
General use software installed with yum install directly can, but there is a problem: with yum, then, is to use the default mariadb yum source to find, could not be found, so our own install
rpm -ivh + package installation packages needed
rpm -ivh MySQL-client-5.6.42-1.el7.x86_64.rpm
rpm -ivh MySQL-server-5.6.42-1.el7.x86_64.rpm
After a successful installation server some messages will appear as follows:
[root@localhost soft]# rpm -ivh MySQL-server-5.6.42-1.el7.x86_64.rpm
warning: MySQL-server-5.6.42-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:MySQL-server-5.6.42-1.el7 ################################# [100%]
warning: user mysql does not exist - using root
warning: group mysql does not exist - using root
warning: user mysql does not exist - using root
warning: group mysql does not exist - using root
2018-11-18 13:53:24 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-11-18 13:53:24 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2018-11-18 13:53:24 0 [Note] /usr/sbin/mysqld (mysqld 5.6.42) starting as process 6420 ...
2018-11-18 13:53:24 6420 [Note] InnoDB: Using atomics to ref count buffer pool pages
2018-11-18 13:53:24 6420 [Note] InnoDB: The InnoDB memory heap is disabled
2018-11-18 13:53:24 6420 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-11-18 13:53:24 6420 [Note] InnoDB: Memory barrier is not used
2018-11-18 13:53:24 6420 [Note] InnoDB: Compressed tables use zlib 1.2.11
2018-11-18 13:53:24 6420 [Note] InnoDB: Using Linux native AIO
2018-11-18 13:53:24 6420 [Note] InnoDB: Using CPU crc32 instructions
2018-11-18 13:53:24 6420 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2018-11-18 13:53:24 6420 [Note] InnoDB: Completed initialization of buffer pool
2018-11-18 13:53:24 6420 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2018-11-18 13:53:24 6420 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2018-11-18 13:53:24 6420 [Note] InnoDB: Database physically writes the file full: wait...
2018-11-18 13:53:24 6420 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2018-11-18 13:53:25 6420 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2018-11-18 13:53:25 6420 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2018-11-18 13:53:25 6420 [Warning] InnoDB: New log files created, LSN=45781
2018-11-18 13:53:25 6420 [Note] InnoDB: Doublewrite buffer not found: creating new
2018-11-18 13:53:25 6420 [Note] InnoDB: Doublewrite buffer created
2018-11-18 13:53:25 6420 [Note] InnoDB: 128 rollback segment(s) are active.
2018-11-18 13:53:25 6420 [Warning] InnoDB: Creating foreign key constraint system tables.
2018-11-18 13:53:25 6420 [Note] InnoDB: Foreign key constraint system tables created
2018-11-18 13:53:25 6420 [Note] InnoDB: Creating tablespace and datafile system tables.
2018-11-18 13:53:25 6420 [Note] InnoDB: Tablespace and datafile system tables created.
2018-11-18 13:53:25 6420 [Note] InnoDB: Waiting for purge to start
2018-11-18 13:53:25 6420 [Note] InnoDB: 5.6.42 started; log sequence number 0
A random root password has been set. You will find it in '/root/.mysql_secret'.
2018-11-18 13:53:26 6420 [Note] Binlog end
2018-11-18 13:53:26 6420 [Note] InnoDB: FTS optimize thread exiting.
2018-11-18 13:53:26 6420 [Note] InnoDB: Starting shutdown...
2018-11-18 13:53:27 6420 [Note] InnoDB: Shutdown completed; log sequence number 1625977
2018-11-18 13:53:27 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-11-18 13:53:27 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2018-11-18 13:53:27 0 [Note] /usr/sbin/mysqld (mysqld 5.6.42) starting as process 6444 ...
2018-11-18 13:53:27 6444 [Note] InnoDB: Using atomics to ref count buffer pool pages
2018-11-18 13:53:27 6444 [Note] InnoDB: The InnoDB memory heap is disabled
2018-11-18 13:53:27 6444 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-11-18 13:53:27 6444 [Note] InnoDB: Memory barrier is not used
2018-11-18 13:53:27 6444 [Note] InnoDB: Compressed tables use zlib 1.2.11
2018-11-18 13:53:27 6444 [Note] InnoDB: Using Linux native AIO
2018-11-18 13:53:27 6444 [Note] InnoDB: Using CPU crc32 instructions
2018-11-18 13:53:27 6444 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2018-11-18 13:53:27 6444 [Note] InnoDB: Completed initialization of buffer pool
2018-11-18 13:53:27 6444 [Note] InnoDB: Highest supported file format is Barracuda.
2018-11-18 13:53:27 6444 [Note] InnoDB: 128 rollback segment(s) are active.
2018-11-18 13:53:27 6444 [Note] InnoDB: Waiting for purge to start
2018-11-18 13:53:27 6444 [Note] InnoDB: 5.6.42 started; log sequence number 1625977
2018-11-18 13:53:27 6444 [Note] Binlog end
2018-11-18 13:53:27 6444 [Note] InnoDB: FTS optimize thread exiting.
2018-11-18 13:53:27 6444 [Note] InnoDB: Starting shutdown...
2018-11-18 13:53:29 6444 [Note] InnoDB: Shutdown completed; log sequence number 1625987
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
WARNING: Found existing config file /usr/my.cnf on the system.
Because this file might be in use, it was not replaced,
but was used in bootstrap (unless you used --defaults-file)
and when you later start the server.
The new default config file was created as /usr/my-new.cnf,
please compare it with your file and take the changes you need.
Wherein there is provided two specified mysql install a random initial password to root:
The location of the password on the '/root/.mysql_secret' file
For the first time using mysql landing, the landing will be forced to change it after
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.
View the file, you can see that I generate a new random password when you reinstall mysql
ps -ef | grep -i mysql mysql process to see if there
Use rpm -qa | grep -I mysql mysql look at whether the installation was successful, see mysql two components, that is, the installation was successful
To set a random password for the root account after 5.6
Save password to the root / .mysql_secret file
Behind this initial need to log in with a password mysql
Start the service: service mysql start
ps -ef | grep mysql mysql service to see if there
Log database:
mysql -uroot -p knockout round
Then enter a random password
After logging in, suggesting that some of the information
The connecting thread id, version of what
show databases; see what library database
Before using to set its own password
We will ask a random password reset
Reset Password Method: set password = password ( 'root');
It is the current user to set a password for root
Then run the show databases;
mysql library will be built some systems:
information_schema keep some statistics
performance_schema keep some state data,
mysql stored data for monitoring, permissions, accounts, etc.
test test library for test purposes
If you reinstall, data directory has not changed, then before the library still exists
Database download package:
https://www.mysql.com/downloads/
Open the original agreement in the community of open source GPL version inside Download
We use mysql community server inside
Which is the client workbench tool
MySQL Cluster is an oracle out of their own version of the cluster (it integrates a number of open source tools and value-added services)
Select the operating system and version
It recommended to install in linux
You can also select the version
Download the server package and client packages
If a server package, architecture diagram of the things that have a
Also next client utilities packet, the client packages, similar connection layer
After downloading the inside spread centos linux system with command rz
rpm is the package manager
xshell can directly drag
Rz command can also be used, if not install it: yum install lrzsz
yum is the Package Explorer, the problem can be solved package dependencies, the package needs to have downloaded
Spread linux system
Install mysql steps:
Environmental clean-up
centos7 will own a mariadb
To see if you have installed
rpm -qa |grep -i mysql
rpm -qa | grep -i mariadb (centos7 default system comes)
mariadb mysql come from, is one of its branches, need to be cleaned out
Clean out mariadb package
Yum install you directly, then use the yum source mariadb, which is not the same with mysql official version, we have to install the official version, you need to clear out mariadb, and then manually install their own official version of mysql download
rpm -e plus package name, the package cleared mariadb
Rpm can be seen with the deletion will fail, suggesting the need to install software dependencies
rpm -e mariadb-libs-5.5.56-2.el7.x86_64
When rpm deleted if there are dependencies, you can use yum remove + package name to delete mariadb
start installation:
General use software installed with yum install directly can, but there is a problem: with yum, then, is to use the default mariadb yum source to find, could not be found, so our own install
rpm -ivh + package installation packages needed
rpm -ivh MySQL-client-5.6.42-1.el7.x86_64.rpm
rpm -ivh MySQL-server-5.6.42-1.el7.x86_64.rpm
After a successful installation server some messages will appear as follows:
[root@localhost soft]# rpm -ivh MySQL-server-5.6.42-1.el7.x86_64.rpm
warning: MySQL-server-5.6.42-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:MySQL-server-5.6.42-1.el7 ################################# [100%]
warning: user mysql does not exist - using root
warning: group mysql does not exist - using root
warning: user mysql does not exist - using root
warning: group mysql does not exist - using root
2018-11-18 13:53:24 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-11-18 13:53:24 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2018-11-18 13:53:24 0 [Note] /usr/sbin/mysqld (mysqld 5.6.42) starting as process 6420 ...
2018-11-18 13:53:24 6420 [Note] InnoDB: Using atomics to ref count buffer pool pages
2018-11-18 13:53:24 6420 [Note] InnoDB: The InnoDB memory heap is disabled
2018-11-18 13:53:24 6420 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-11-18 13:53:24 6420 [Note] InnoDB: Memory barrier is not used
2018-11-18 13:53:24 6420 [Note] InnoDB: Compressed tables use zlib 1.2.11
2018-11-18 13:53:24 6420 [Note] InnoDB: Using Linux native AIO
2018-11-18 13:53:24 6420 [Note] InnoDB: Using CPU crc32 instructions
2018-11-18 13:53:24 6420 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2018-11-18 13:53:24 6420 [Note] InnoDB: Completed initialization of buffer pool
2018-11-18 13:53:24 6420 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2018-11-18 13:53:24 6420 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2018-11-18 13:53:24 6420 [Note] InnoDB: Database physically writes the file full: wait...
2018-11-18 13:53:24 6420 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2018-11-18 13:53:25 6420 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2018-11-18 13:53:25 6420 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2018-11-18 13:53:25 6420 [Warning] InnoDB: New log files created, LSN=45781
2018-11-18 13:53:25 6420 [Note] InnoDB: Doublewrite buffer not found: creating new
2018-11-18 13:53:25 6420 [Note] InnoDB: Doublewrite buffer created
2018-11-18 13:53:25 6420 [Note] InnoDB: 128 rollback segment(s) are active.
2018-11-18 13:53:25 6420 [Warning] InnoDB: Creating foreign key constraint system tables.
2018-11-18 13:53:25 6420 [Note] InnoDB: Foreign key constraint system tables created
2018-11-18 13:53:25 6420 [Note] InnoDB: Creating tablespace and datafile system tables.
2018-11-18 13:53:25 6420 [Note] InnoDB: Tablespace and datafile system tables created.
2018-11-18 13:53:25 6420 [Note] InnoDB: Waiting for purge to start
2018-11-18 13:53:25 6420 [Note] InnoDB: 5.6.42 started; log sequence number 0
A random root password has been set. You will find it in '/root/.mysql_secret'.
2018-11-18 13:53:26 6420 [Note] Binlog end
2018-11-18 13:53:26 6420 [Note] InnoDB: FTS optimize thread exiting.
2018-11-18 13:53:26 6420 [Note] InnoDB: Starting shutdown...
2018-11-18 13:53:27 6420 [Note] InnoDB: Shutdown completed; log sequence number 1625977
2018-11-18 13:53:27 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-11-18 13:53:27 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2018-11-18 13:53:27 0 [Note] /usr/sbin/mysqld (mysqld 5.6.42) starting as process 6444 ...
2018-11-18 13:53:27 6444 [Note] InnoDB: Using atomics to ref count buffer pool pages
2018-11-18 13:53:27 6444 [Note] InnoDB: The InnoDB memory heap is disabled
2018-11-18 13:53:27 6444 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-11-18 13:53:27 6444 [Note] InnoDB: Memory barrier is not used
2018-11-18 13:53:27 6444 [Note] InnoDB: Compressed tables use zlib 1.2.11
2018-11-18 13:53:27 6444 [Note] InnoDB: Using Linux native AIO
2018-11-18 13:53:27 6444 [Note] InnoDB: Using CPU crc32 instructions
2018-11-18 13:53:27 6444 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2018-11-18 13:53:27 6444 [Note] InnoDB: Completed initialization of buffer pool
2018-11-18 13:53:27 6444 [Note] InnoDB: Highest supported file format is Barracuda.
2018-11-18 13:53:27 6444 [Note] InnoDB: 128 rollback segment(s) are active.
2018-11-18 13:53:27 6444 [Note] InnoDB: Waiting for purge to start
2018-11-18 13:53:27 6444 [Note] InnoDB: 5.6.42 started; log sequence number 1625977
2018-11-18 13:53:27 6444 [Note] Binlog end
2018-11-18 13:53:27 6444 [Note] InnoDB: FTS optimize thread exiting.
2018-11-18 13:53:27 6444 [Note] InnoDB: Starting shutdown...
2018-11-18 13:53:29 6444 [Note] InnoDB: Shutdown completed; log sequence number 1625987
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
WARNING: Found existing config file /usr/my.cnf on the system.
Because this file might be in use, it was not replaced,
but was used in bootstrap (unless you used --defaults-file)
and when you later start the server.
The new default config file was created as /usr/my-new.cnf,
please compare it with your file and take the changes you need.
Wherein there is provided two specified mysql install a random initial password to root:
The location of the password on the '/root/.mysql_secret' file
For the first time using mysql landing, the landing will be forced to change it after
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.
View the file, you can see that I generate a new random password when you reinstall mysql
ps -ef | grep -i mysql mysql process to see if there
Use rpm -qa | grep -I mysql mysql look at whether the installation was successful, see mysql two components, that is, the installation was successful
To set a random password for the root account after 5.6
Save password to the root / .mysql_secret file
Behind this initial need to log in with a password mysql
Start the service: service mysql start
ps -ef | grep mysql mysql service to see if there
Log database:
mysql -uroot -p knockout round
Then enter a random password
After logging in, suggesting that some of the information
The connecting thread id, version of what
show databases; see what library database
Before using to set its own password
We will ask a random password reset
Reset Password Method: set password = password ( 'root');
It is the current user to set a password for root
Then run the show databases;
mysql library will be built some systems:
information_schema keep some statistics
performance_schema keep some state data,
mysql stored data for monitoring, permissions, accounts, etc.
test test library for test purposes
If you reinstall, data directory has not changed, then before the library still exists