I saw in the group that some new students were still asking about MySQL not being able to start, so I summarized several common situations and solutions. Friends who need them can refer to them.
I saw some in the group yesterday. The new students were still asking about the problem of MySQL not being able to start, so they summarized a few common situations and thought of it as a popular post.
Problem 1: Directory and file permission settings are incorrect
MySQL’s $datadir directory, and its subordinate directories and file permissions The attribute is set incorrectly, causing MySQL to be unable to read and write files normally and unable to start.
Error messageFor example:
The code is as follows:
mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data /usr/local/mysql/bin/mysqld_safe: line 107: /usr/local/mysql/data/imysql.local.err: Permission denied
Problem 2: Port conflict
Other mysqld instances have been started and occupy the same port. The port option needs to be modified.
Error message for example:
The code is as follows:
[ERROR] Can't start server: Bind on TCP/IP port: Address already in use [ERROR] Do you already have another mysqld server running on port: 3306 ? [ERROR] Aborting
Problem 3: Innodb configuration is incorrect
innodb The settings for datafile and log file are incorrect, resulting in failure to start. Especially when I started it with default parameters for the first time, and then after referring to some optimization guides, I modified the parameters of innodb, and it will prompt different size. Detailed errors are for example:
The code is as follows:
InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes InnoDB: than specified in the .cnf file 0 134217728 bytes! [ERROR] Plugin ‘InnoDB' init function returned error. [ERROR] Plugin ‘InnoDB' registration as a STORAGE ENGINE failed.
Question 4: The mysql system library is not initialized
After MySQL is installed, you need to run mysql_install_db to initialize the mysql system library before it can start normally.
Question 5: If you run mysql with normal user permissions, you need to pay attention to some directory permissions and username and password settings
Sometimes in order to make mysql update For safety, we will all run mysql with low permissions. Due to some security settings tools, we need to reset the password for this user.
This time I will list the above frequently asked questions, and I will add them next time.
Normally, when the mysqld process cannot be started, regardless of any errors, the error log will be checked first (the log file is usually in the $datadir/xx.err file, or /var/log/message, /var /log/mysql/mysqld.log, etc.), follow the error log prompts to find the cause of the problem, do not just look at the superficial prompts, such as the mysql.sock file cannot be found.
The above is the detailed content of Several common problems when mysql cannot be started. For more information, please follow other related articles on the PHP Chinese website!

本篇文章给大家带来了关于mysql的相关知识,其中主要介绍了关于架构原理的相关内容,MySQL Server架构自顶向下大致可以分网络连接层、服务层、存储引擎层和系统文件层,下面一起来看一下,希望对大家有帮助。

在mysql中,可以利用char()和REPLACE()函数来替换换行符;REPLACE()函数可以用新字符串替换列中的换行符,而换行符可使用“char(13)”来表示,语法为“replace(字段名,char(13),'新字符串') ”。

方法:1、利用right函数,语法为“update 表名 set 指定字段 = right(指定字段, length(指定字段)-1)...”;2、利用substring函数,语法为“select substring(指定字段,2)..”。

mysql的msi与zip版本的区别:1、zip包含的安装程序是一种主动安装,而msi包含的是被installer所用的安装文件以提交请求的方式安装;2、zip是一种数据压缩和文档存储的文件格式,msi是微软格式的安装包。

转换方法:1、利用cast函数,语法“select * from 表名 order by cast(字段名 as SIGNED)”;2、利用“select * from 表名 order by CONVERT(字段名,SIGNED)”语句。

本篇文章给大家带来了关于mysql的相关知识,其中主要介绍了关于MySQL复制技术的相关问题,包括了异步复制、半同步复制等等内容,下面一起来看一下,希望对大家有帮助。

本篇文章给大家带来了关于mysql的相关知识,其中主要介绍了mysql高级篇的一些问题,包括了索引是什么、索引底层实现等等问题,下面一起来看一下,希望对大家有帮助。

在mysql中,可以利用REGEXP运算符判断数据是否是数字类型,语法为“String REGEXP '[^0-9.]'”;该运算符是正则表达式的缩写,若数据字符中含有数字时,返回的结果是true,反之返回的结果是false。


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

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 English version
Recommended: Win version, supports code prompts!

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)
