MySQL5.6.40 installation process under CentOS7 64 1) Uninstall the previously installed MySQL rm -rf /usr/local/mysql rm -rf /etc/init.d/mysqld 2) Delete the database directory
3) Install dependent packages after uninstallation to avoid problems during installation yum -y install wget vim bash-completion yum -y install gcc gcc-c++ cmake ncurses-devel autoconf perl perl-devel 4) Download mysql-5.6.40.tar.gz
5) Create the MySQL installation directory, data storage directory, and user group mkdir -p /usr/local/mysql/data groupadd mysql useradd -r -g mysql mysql 6) Unzip the file to the current folder and install tar -zxvf mysql-5.6.40.tar.gz cd mysql-5.6.40 cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \ #Default installation directory -DINSTALL_DATADIR=/usr/local/mysql/data \ #Database storage directory -DDEFAULT_CHARSET=utf8 \ #Use utf8 characters -DDEFAULT_COLLATION=utf8_general_ci \ #Check characters -DEXTRA_CHARSETS=all \ #Install all extended character sets -DENABLED_LOCAL_INFILE=1 #Allow data to be imported locally make && make install 7) Set directory permissions cd /usr/local/mysql chown -R mysql:mysql . chown -R mysql:mysql data 8) Add the mysql startup service to the system services
9) Create a basic table
10) Configure the environment variables and add them vim /etc/profile export MYSQL_HOME="/usr/local/mysql" export PATH="$PATH:$MYSQL_HOME/bin" #:wqSave and exitsource /etc/profile 11) Add the mysql startup file to the system startup file
12) mysql command under centOS7 systemctl start mysql systemctl restart mysql systemctl stop mysql systemctl enable mysql 13) Change mysql password
14) Connect to MySQL mysql -uroot -p ****** #Enter password exit #Exit Summarize This is the end of this article about the installation process of MySQL5.6.40 under CentOS7 64. For more information about installing MySQL5.6.40 on CentOS7, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: An article teaches you JS function inheritance
>>: Analysis of Alibaba Cloud CentOS7 server nginx configuration and FAQs
For example, when you create a new table or updat...
Table of contents Example 1 Example 2 Example 3 E...
Table of contents 1. Phenomenon 2. Solution 3. Su...
Table of contents 1. Advantages of proxy vs. Obje...
I designed and customized a navigation bar with a...
I've been writing a WeChat applet recently an...
The Truncate table statement is used to delete/tr...
Many people say that IE6 does not support PNG tra...
Table of contents Short Introduction 1. Check the...
Product designers face complex and large manufactu...
Table of contents 1. System environment 2. Operat...
Preface Usually, a "paging" strategy is...
Table of contents Vue custom directive Custom dir...
Preface Docker has been very popular in the past ...
Table of contents Chain calls A small case Chain ...