当前位置:网站首页>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
边栏推荐
- 数据库mysql 主从方案
- Call CMD process communication
- 交互电子白板有哪些特点?电子白板功能介绍
- web技术分享| 【高德地图】实现自定义的轨迹回放
- 【C语言】深度剖析指针和数组的关系
- Short video source code development, high-quality short video source code need to do what?
- linux系统维护篇:mysql8.0.13源码下载及安装之“傻瓜式”操作步骤(linux-centos6.8)亲测可用系列
- 什么是RESTful,REST api设计时应该遵守什么样的规则?
- Analysis of the writer source code of spark shuffle
- Idea installation summary
猜你喜欢
随机推荐
Web technology sharing | [Gaode map] to realize customized track playback
面试知识点
spark-shuffle的写入器源码分析
Vs2017 solution to not displaying qstring value in debugging status
NiO programming service
User exit and customer exit in SAP ABAP -015
同花顺怎么开户?网上开户安全么?
Test for API
MYSQL 存储过程异常处理 报错 错误代码: 1337
jMeter使用案例
[MYSQL]数据同步提示:Specified key was too long;max key length is 767 bytes
What should I do if I can't hear a sound during a video conference?
Interface idempotent design
Vhedt business development framework
购买指南丨如何购买一台高质量会议平板,这几个方面一定要对比
Summary of JS methods for obtaining data types
Simple understanding of asynchronous IO
让代码优雅起来(学会调试+代码风格)
Linux system maintenance: mysql8.0.13 source code download and installation "fool" operation steps (Linux centos6.8) test available series
Idea installation summary









