当前位置:网站首页>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
边栏推荐
- 调用cmd 进程通信
- 购买指南丨如何购买一台高质量会议平板,这几个方面一定要对比
- NiO uses writable events to handle the situation of one-time write incompleteness
- 2022年中国重卡智能化升级专题研究
- Jsp Learning (2) - - jsp script Elements and instructions
- Source code analysis of spark cache
- 代码扫描工具扫出的 Arrays.asList 使用BUG
- STM32 ADC acquisition via DMA (HAL Library)
- Smart forms-014 in SAP ABAP
- 论催收系统的任务调度设计
猜你喜欢

jsp学习之(一)---------jsp概述
![[wechat applet custom bottom tabbar]](/img/04/2ea4ab3fd8571499190a9b3c9990b2.png)
[wechat applet custom bottom tabbar]

图计算Hama-BSP模型的运行流程

【C语言】深度剖析指针和数组的关系

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

SAP script tutorial: se71, se78, SCC1, vf03, so10-013

大话局部性原理

VHEDT业务发展框架

How to add a "security lock" to the mobile office of government and enterprises?

视频会议时听不到声音该如何处理?
随机推荐
Test for API
How to use IDM to accelerate Baidu cloud
IDEA安装总结
spark常用 算子小总结
对ABAP程序调优的学习(四)LOOP WHERE KEY
同花顺容易开户么?网上开户安全么?
Spark Streaming-Receiver启动和数据接收
spark关于数据倾斜问题
Summary of spark common operators
Vhedt business development framework
Smart forms-014 in SAP ABAP
redis.clients.jedis.exceptions.JedisDataException ERR invalid password.
Spark性能调优之道——解决Spark数据倾斜(Data Skew)的N种姿势
[MYSQL]数据同步提示:Specified key was too long;max key length is 767 bytes
系统吞吐量、TPS(QPS)、用户并发量、性能测试概念和公式
【C语言】深度剖析指针和数组的关系
每秒处理10万高并发订单的乐视集团支付系统架构分享
oracle分库分表
Test for API
jsp学习之(一)---------jsp概述