1. 程式人生 > >CentOS 7.x安裝MySQL 5.6的詳細步驟、基本配置及相關說明

CentOS 7.x安裝MySQL 5.6的詳細步驟、基本配置及相關說明

MySQL安裝包內自帶了一個安裝指令碼,此處以mysql-5.6.42-linux-glibc2.12-x86_64.tar.gz為例。

這裡使用的作業系統為CentOS-7-x86_64-Minimal-1810,執行前需要安裝依賴:

yum install perl autoconf -y

開始安裝(內建的安裝指令碼)

scripts/mysql_install_db

附安裝日誌:

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

  ./bin/mysqladmin -u root password 'new-password'
  ./bin/mysqladmin -u root -h server-131 password 'new-password'

Alternatively you can run:

  ./bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

  cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

  cd mysql-test ; perl mysql-test-run.pl

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 ./my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings

WARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
--defaults-file argument to mysqld_safe when starting the server

附文:如何在Windows 10上安裝MySQL?