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
This article uses examples to describe the operat...
SQL method for calculating timestamp difference O...
Table of contents summary Environment and tool pr...
Introduction Linux is a system that can automatic...
Table of contents 1. setState() Description 1.1 U...
I recently used the MySql database when developin...
After pressing Enter on the webpage, the form is a...
When the img src value is empty, two requests are ...
Preface The company's Ubuntu server places th...
Preface In a relatively complex large system, if ...
You may often see the following effect: That’s ri...
The latest Insider version of Visual Studio Code ...
cause The reason for writing this blog is that I ...
Table of contents 1. Install node 2. Install Comm...
This article shares the specific code of Vue.js f...