Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

CentOS Yum compilation and installation of MySQL 5.6

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article is an example to share the specific code for centos yum to install mysql 5.6. for your reference, the details are as follows

1. Check whether the system installs other versions of MYSQL data

# yum list installed | grep mysql#yum-y remove mysql-libs.x86_64

two。 Installation and configuration

# wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm# rpm-ivh mysql-community-release-el6-5.noarch.rpm# yum repolist all | grep mysql

Install the MYSQL database

# yum install mysql-community-server-y

Set to boot (2, 3, 4 are all on for boot automatically)

# chkconfig-- list | grep mysqld# chkconfig mysqld on

3. Set up remote root

Start mysql

# service mysqld start

Set root password

# mysql_secure_installation

Log in to the root account

# mysql-uroot-p

Establish a remote root user

Mysql > GRANT ALL PRIVILEGES ON *. * TO 'root'@'%' IDENTIFIED BY' you set the password 'WITH GRANT OPTION;mysql > flush privileges

4. Set utf-8 Encoding

View the original mysql code:

Mysql > show variables like 'character%'

Set Encodin

# vi / etc/my.cnf

As follows (make up less):

[mysqld] character-set-server=utf8 collation-server=utf8_general_ ci [MySQL] default-character-set = UTF8 [mysql.server] default-character-set = UTF8 [mysqld _ safe] default-character-set = utf8 [client] default-character-set = utf8

Restart mysql

# service mysqld restart

Check the code again:

# mysql-uroot-pmysql > show variables like 'character%' +-- +-- + | Variable_name | Value | +-- +-- + | character _ set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | character_set_results | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | / usr/share/mysql/charsets/ | +-- -+ 8 rows in set (0.00 sec)

5. Add the environment variable and edit / etc/profile so that you can use the mysql command anywhere

Export PATH=$PATH:/usr/local/mysql//bin

Source / etc/profile

Wonderful topic sharing: different versions of mysql installation tutorials mysql5.7 various versions of installation tutorials mysql5.6 installation tutorials

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report