Problem: The partition capacity of the data file stored by mysql is small and is currently full, causing mysql to be unable to connect.
Solution:
1. Delete unnecessary data in the partition, such as log files, etc. (cannot solve the fundamental problem)
2. Expand the capacity of a certain disk
3. Modify the data storage location
Steps to modify the data storage location:
1, View mysql Storage directory
#安装目录 --basedir=/usr #数据存储位置 --datadir=/home/mysqlData/mysql #用户 --user=mysql #日志 --log-error=/home/mysqlData/mysql/localhost.localdomain.err #端口 --port=33062. Stop the mysql service
service mysql stop3. Create directory
mkdir /home/mysql chown -R mysql:mysql /home/mysqlData4. Data file transfer (move the entire /var/lib/mysql to /home/mysqlData)
cp -afir /var/lib/mysql /home/mysqlData5. Modify the MySql configuration document /etc/my.cnf configuration document
[client] port = 3306#修改后的目录 socket = /home/mysqlData/mysql/mysql.sock [mysqld] port = 3306default-storage-engine = InnoDB #默认存储引擎 lower_case_table_names = 1 #不区分大小写 max-connections=3000character_set_server=utf8 #修改后的目录 datadir=/home/mysqlData/mysql #修改后的目录 sock=/home/mysqlData/mysql/mysql.sock6. Modify the MySQL startup script /etc/init.d/mysqlChange the datadir item in the /etc/init.d/mysql file to /home/mysqlData/
mysql
vim /etc/init.d/mysql
service mysql start
The above is the detailed content of Example tutorial on modifying data files in mysql5.6.33. For more information, please follow other related articles on the PHP Chinese website!

wpsystem文件夹是windows应用文件夹;创建WpSystem文件夹是为了存储某些特定“Microsoft Store”应用程序的数据,因此建议不要删该文件夹,因为删除之后就无法使用指定的应用。

winreagent是在系统更新或升级的过程中创建的文件夹;该文件夹中通常包含临时文件,当更新或升级失败时,系统将通过还原先前创建的临时文件来回滚到执行更新或升级过程之前的版本。

baidunetdiskdownload是百度网盘默认下载文件的文件夹;百度网盘是百度推出的一项云存储服务,只要下载东西到百度网盘里,都会默认保存到这个文件夹中,并且可跨终端随时随地查看和分享。

“usmt.ppkg”是windows自带的系统还原功能的系统备份文件;Windows系统还原是在不需要重新安装操作系统,也不会破坏数据文件的前提下使系统回到原有的工作状态,PBR恢复功能的备份文件就是“usmt.ppkg”。

mobileEmuMaster是手机模拟大师的安装文件夹。手机模拟大师是PC电脑模拟运行安卓系统的免费模拟器程序,一款可以让用户在电脑上运行手机应用的软件,支持安装安卓系统中常见的apk执行文件,支持QQ、微信等生活常用应用,达到全面兼容的效果。

备份文件的扩展名通常是“.bak”;bak文件是一个备份文件,这类文件一般在'.bak前面加上应该有原来的扩展名,有的则是由原文件的后缀名和bak混合而成,在生成了某种类型的文件后,就会自动生成它的备份文件。

kml是谷歌公司创建的一种地标性文件格式;该文件用于记录某一地点或连续地点的时间、经度、纬度、海拔等地理信息数据,可以被“Google Earth”和“Google Maps”识别并显示。

config是软件或者系统中的配置文件,不可以删除;该文件是在用户开机时对计算机进行初始化设置,也就是用户对系统的设置都由它来对计算机进行恢复,因此不能删除软件或者系统中的config配置文件,以免造成错误。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Atom editor mac version download
The most popular open source editor

Notepad++7.3.1
Easy-to-use and free code editor
