修改mysql端口后重启mysql报错:Can't start server: Bind on TCP/IP port. Got error...n denied

1:错误信息:如下

[[email protected] ~]# systemctl status mariadb
● mariadb.service - MariaDB 10.2.30 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: failed (Result: exit-code) since Fri 2019-12-13 09:06:20 CST; 1min 16s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 22950 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS --basedir=/usr $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 22923 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 22921 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Main PID: 22950 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

Dec 13 09:06:19 host-10-3-6-39 mysqld[22950]: 2019-12-13  9:06:19 139835293538048 [Note] InnoDB: Buffer pool(s) load completed at 191213  9:06:19
Dec 13 09:06:19 host-10-3-6-39 mysqld[22950]: 2019-12-13  9:06:19 139836014606464 [Note] Plugin ‘FEEDBACK‘ is disabled.
Dec 13 09:06:19 host-10-3-6-39 mysqld[22950]: 2019-12-13  9:06:19 139836014606464 [Note] Server socket created on IP: ‘::‘.
Dec 13 09:06:19 host-10-3-6-39 mysqld[22950]: 2019-12-13  9:06:19 139836014606464 [ERROR] 1
Dec 13 09:06:19 host-10-3-6-39 mysqld[22950]: 2019-12-13  9:06:19 139836014606464 [ERROR] Do you already have another mysqld server running ...: 3366 ?
Dec 13 09:06:19 host-10-3-6-39 mysqld[22950]: 2019-12-13  9:06:19 139836014606464 [ERROR] Aborting
Dec 13 09:06:20 host-10-3-6-39 systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Dec 13 09:06:20 host-10-3-6-39 systemd[1]: Failed to start MariaDB 10.2.30 database server.
Dec 13 09:06:20 host-10-3-6-39 systemd[1]: Unit mariadb.service entered failed state.
Dec 13 09:06:20 host-10-3-6-39 systemd[1]: mariadb.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

2:解决方法

修改mysql端口后需要修改: vi /etc/selinux/config
SELINUX=disabled
然后重启服务。
可以用命令:setenforce 0 临时关闭selinux ,不用重启服务器;
setenforce 0
systemctl restart mariadb

修改mysql端口后重启mysql报错:Can't start server: Bind on TCP/IP port. Got error...n denied

原文地址:https://www.cnblogs.com/yshyee/p/12033206.html

时间: 2024-10-29 19:07:38

修改mysql端口后重启mysql报错:Can't start server: Bind on TCP/IP port. Got error...n denied的相关文章

MySQL "Bind on TCP/IP port: Address already in use"

最近在已部署MySQL Enterprise Monitor的服务器上新增了MySQL实例,导致MySQL Enterprise Monitor异常宕机了,无法重新启动成功.收到了Bind on TCP/IP port: Address already in use的错误提示.下面是这个问题的解决办法,供大家参考. 1.故障现象[[email protected] init.d]# ./mysql-monitor-server startStarting mysql service  [ OK

mysql8 修改my.ini配置 重启服务 报错

mysql8 修改my.in 配置重启服务之后 报错:本地计算机上的MySQL服务启动后停止.某些服务在未由其他服务或程序使用时将自动停止 解决方案:1.备份mysql数据目录 整个目录备份到其他地方,然后清空该目录 2.找到之前下载的安装文件 例如:mysql-installer-community-8.0.16.0.msi 双击打开 然后重新配置安装 重新安装成功之后 3.把刚才备份的 data目录 全部拷贝 覆盖回来,覆盖之前先停止mysql服务 4.覆盖之后重启mysql服务 原文地址:

修改mysql端口后,重启失败

mysql更改端口修改/etc/my.cnf添加port=3308 然后重启mysql如果你开启了selinux,mysql会无法启动,你会在日志中看到以下错误 [ERROR] Can't start server: Bind on TCP/IP port: Permission denied[ERROR] Do you already have another mysqld server running on port: 3308 那么,你需要关掉selinux,不想重启服务器,而关掉seli

mac系统中搭建apache+mysql+php的开发环境,安装mysql后,登录报错:mac ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

php新手在mac系统中搭建apache+mysql+php的开发环境(按照这篇博客来操作的:http://my.oschina.net/joanfen/blog/171109?fromerr=xvCsafCe),在安装配置mysql完毕后,登录mysql,报错:mac ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO),折腾很久,终于解决,随手记录下,备忘. 解决方法: 第一步:如

升级 MySQL 至 5.5,报错 [ERROR] Plugin 'InnoDB' init function returned error

MySQL 从 5.5 升级到 5.6,启动时报错: [ERROR] Plugin 'InnoDB' init function returned error. [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. [ERROR] Unknown/unsupported storage engine: InnoDB [ERROR] Aborting 原因:主要是没有正常关闭 mysqld 服务的情况下,对数据库参数进行改

【Mysql】存储emoji表情报错(Incorrect string value: '\xF0\x9F\x98\x82\xF0\x9F...')的解决方案

普通的字符串或者表情都是占位3个字节,所以utf8足够用了,但是移动端的表情符号占位是4个字节,普通的utf8就不够用了,为了应对无线互联网的机遇和挑战.避免 emoji 表情符号带来的问题.涉及无线相关的 MySQL 数据库建议都提前采用 utf8mb4 字符集,这必须要作为移动互联网行业的一个技术选型的要点 Mysql 版本的限制,Mysql 5.5.3之前的版本,支持的utf8为3字节的,Mysql 5.5.3之后的版本支持utf8mb4 修改mysql的配置文件,windows下的为my

native 链接 mysql 8.0以上版本 报错2059

MySQL版本是8.0.4  由于新版本的MySQL新特性导致的. mysql> select Host,User,plugin from mysql.user; +-----------+------------------+-----------------------+ | Host | User | plugin | +-----------+------------------+-----------------------+ | localhost | mysql.infoschem

MySql数据库执行insert时候报错:Column count doesn't match value count at row 1

遇到这个问题之后,第一反应就是前后列数不等造成的,但是我检查SQL之后,发现列数是相同得,但是插入还是有问题,然后又写了简单得SQL只插入不为空得字段,执行还是报这个错,最后请教了高人,指点之后,大概是因为当前插入得表被锁住了,然后执行下面得SQL后,之前得SQL就可以正常插入了 LOCK TABLES `system_function_info` WRITE;  UNLOCK TABLES; MySql数据库执行insert时候报错:Column count doesn't match val

客户端cmd打开mysql,执行插入中文报错或插入中文乱码解决方案

最近在制作一个安装包,需要安装的时候执行mysql脚本儿,做了一个批处理,但是发现总是执行到 插入中文的时候报错,或者插入中文是乱码. 网上查了好多资料,说是把编码改成GBK什么的,终究还是不成功. 最后经过多次测试,现把解决方案分享给大家. 第一步:打开mysql中的配置文件,my.ini,看一看配置文件中 [mysql] default-character-set=utf8 [mysqld] character-set-server=utf8 看是不是这样配置的.因为utf8 是国际通用的,