当前位置:网站首页>Mysql-5.6.21-centos6.5 source code installation configuration
Mysql-5.6.21-centos6.5 source code installation configuration
2022-06-22 16:56:00 【MarshalEagle】
Use the source code installation method to mysql-5.6.21-linux-glibc2.5-x86_64.tar.gz Install to specified directory (/data/)
1. Upload mysql-5.6.21-linux-glibc2.5-x86_64.tar.gz File to /data/ Catalog ( Create if not )
2. Get into data Directory extract file
#cd /data
# tar -zxvf mysql-5.6.21-linux-glibc2.5-x86_64.tar.gz
3. establish mysql User group
#groupadd mysql
4. establish mysql Users and join mysql User group
#useradd mysql -g mysql -p mypassword -s /sbin/nologin -M
5. Build soft links
#ln -s mysql-5.6.21-linux-glibc2.5-x86_64 mysql
6. Execute the following command :
# cd mysql
# chown -R mysql .# chgrp -R mysql .
# scripts/mysql_install_db --user=mysql
#chown -R root .
#chown -R mysql data
#cp support-files/my-medium.cnf /etc/my.cnf (128M Memory )
perhaps cp support-files/my-large.cnf /etc/my.cnf(512M Memory )
perhaps cp support-files/my-huge.cnf /etc/my.cnf(1-2G Memory )
perhaps cp support-files/my-innodb-heavy-4G.cnf /etc/my.cnf(4G Memory )
** If there is no my-large.cnf Etc. may be caused by version , It doesn't matter. You can use the default my.cnf Then modify it according to the business requirements **
#bin/mysqld_safe --user=mysql & ( Wait a while and press enter )
#cp support-files/mysql.server /etc/init.d/mysql
7. And then modify /etc/init.d/mysql file #vi /etc/init.d/mysql
basedir=/data/mysql
datadir=/data/mysql/data
8. take mysql Add to service , And it is set to startup and auto start service
#chkconfig --add mysql#chkconfig mysql on
Conduct test service :
stop it #service mysql stop ( If the Punrecognized service error , Then try this command to solve :#chmod 755 /etc/rc.d/init.d/mysql)start-up #service mysql start
9. Initialize Administrator root Password
#/data/mysql/bin/mysqladmin -u root password 'mypassword'10. Give Way root The account can be used by remote connection (root The default account number is the local connection )
First, the machine is connected to mysql Command line interface :
#/data/mysql/bin/mysql -u root -p
Enter the initial password mypassword
mysql>GRANT ALL PRIVILEGES ON *.* TO [email protected]"%" IDENTIFIED BY "mypassword";
mysql>flush privileges;
mysql>quit;
Check the port #netstat -tpnl notice mysql Port started , perhaps #ps -ef|grep mysql You can see mysql Start up .
Uninstall the source code installed mysql
1, close mysql service
#service mysql stop
2, Delete /etc/init.d/mysql
#rm -rf /etc/init.d/mysql
3, Delete the /data/mysql、/data/mysql-5.6.21-linux-glibc2.5-x86_64
#rm -rf /data/mysql
#rm -rf /data/mysql-5.6.21-linux-glibc2.5-x86_64
The configuration file section explains :***************************************************************************************************
[client]
#password = [your_password]
port = 8916 # Modify the default port of the database client
#socket = /var/lib/mysql/mysql.sock
socket = /data/mysql/mysql.sock
default-character-set=utf8 # Modify the default code of the database client
# *** Application-specific options follow here ***
[mysqld]
# generic configuration options
port = 8916 # Modify the default port of the database client , Consistent with the client
#socket = /var/lib/mysql/mysql.sock
socket = /data/mysql/mysql.sock # Change the data store directory
#event schedule
event_scheduler = 1 # Enable custom event scheduling
innodb_file_per_table=1 # Turn on the indexing mechanism by table
skip-name-resolve # Skip server domain name resolution , Connected database usage IP Connect
character_set_server=utf8 # Modify database code , Consistent with the client
max_connections = 3000 # maximum connection
***************************************************************************************************************************
Be careful : If you change the default port , Found that it couldn't start , You can try to modify socket Path is /tmp/mysql.sock
边栏推荐
- SAP value process & help request process-011
- Special research on Intelligent upgrading of heavy trucks in China in 2022
- ALV report in SAP tutorial - ABAP list viewer -012
- 让代码优雅起来(学会调试+代码风格)
- uniapp微信小程序获取页面二维码(带有参数)
- 洞见科技牵头的全球「首个」IEEE隐私计算「互联互通」国际标准正式启动
- [MYSQL]数据同步提示:Specified key was too long;max key length is 767 bytes
- 对ABAP程序调优的学习(四)LOOP WHERE KEY
- Learning about ABAP program tuning (IV) loop where key
- 面试题之 <img>标签 的 title 和 alt 有什么区别
猜你喜欢
![Web technology sharing | [Gaode map] to realize customized track playback](/img/0b/25fc8967f5cc2cea626e0b3f2b7594.png)
Web technology sharing | [Gaode map] to realize customized track playback

【阿里云服务器-安装mysql的5.6版本安装,重装】

系统吞吐量、TPS(QPS)、用户并发量、性能测试概念和公式

社会担当 广汽本田“梦想童行”倡导儿童道路交通安全

2022年中国重卡智能化升级专题研究

The world's "first" IEEE privacy computing "connectivity" international standard led by insight technology was officially launched

面对默认导入失败的情况

Short video source code development, high-quality short video source code need to do what?

【微信小程序自定义底部tabbar】

jMeter使用案例
随机推荐
SAP ABAP report programming-08
[C language] deeply analyze the relationship between pointer and array
NiO service multithreaded version
【微信小程序封装底部弹出框】一
Shell learning
mysql5.7.27安装之windows8.1 64
In case of default import failure
[MYSQL]一台windows电脑安装多个mysql-不同版本
SAP ABAP dialog programming tutorial: module pool in -09
同花顺怎么开户?网上开户安全么?
ERROR 1364 (HY000): Field ssl_cipher doesnt have a default value
Linux system maintenance: mysql8.0.13 source code download and installation "fool" operation steps (Linux centos6.8) test available series
Smart forms-014 in SAP ABAP
面对默认导入失败的情况
scala-for推导:能够在for表达式中的最初部分定义值,并在(外面)后面的表达式中使用该值
spark关于数据倾斜问题
系统吞吐量、TPS(QPS)、用户并发量、性能测试概念和公式
Spark Streaming checkpoint的问题与恢复
【微信小程序自定义底部tabbar】
【阿里云服务器-安装mysql的5.6版本安装,重装】