mg4377娱乐娱城官网_mg4377娱乐手机版_www.mg4377.com

当前位置: mg4377娱乐娱城官网 > mg > 正文

【mg】mysql化解办法,1130错误消除措施

时间:2019-06-17 06:36来源:mg
3种缓慢解决办法(前2种缓慢解决措施的败笔是不可能再利用主机名,而要使用IP地址): 1.在起步参数中增添--skip-name-resolve,关闭反向域名分析功用 2.在my.cnf的[mysqld]一节中追加skip-name

3种缓慢解决办法(前2种缓慢解决措施的败笔是不可能再利用主机名,而要使用IP地址):
1.在起步参数中增添--skip-name-resolve,关闭反向域名分析功用
2.在my.cnf的[mysqld]一节中追加skip-name-resolve
3.在/etc/hosts文件中加上对应的host记录

mysql远程连接战败的三种缓慢解决措施,mysql二种缓和措施

---苏醒内容起始---

(那是转发外人的,因为本身感觉很有用,每一次都以参照他事他说加以考查这几个的第三种办法消除的,不管你听不听获得,先说声多谢!也记下来方便我们看看)

mysql化解长途不能够访问的三种格局,要求的朋友能够参见一下:

1、在/etc/mysql/my.cnf中的[mysqld]【mg】mysql化解办法,1130错误消除措施。段注释掉bind-address = 127.0.0.1
2、用mysql -uroot -p 登入mysql,然后选拔以下办法开启远程访问权限:

方法1:mysql>use mysql;
mysql>update user set host = '%' where user = 'root';
mysql>FLUSH RIVILEGES;

方法2:mysql>GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;

 

转载原版的书文地址:

---苏醒内容甘休---

---恢复生机内容开首--- (那是转载外人的,因为自个儿以为很有用,每一趟都以参照这些的第二...

长途连接mysql 1130荒谬解决办法,mysql1130

mg 1

mg 2

1130不当消除方式,mysql1130...

mysql服务运行却连连不上的消除措施,mysql消除措施

mysql服务运维,然则接连不上,怎么着消除?

登录报错:

  [email protected]:~# mysql -u root -p
  Enter password:
  ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
  [email protected]:~# service mysqld restart
  Shutting down MySQL..                   [ OK ]
  Starting MySQL.                      [ OK ]
  [email protected]:~# mysql -u root -p
  Enter password:
  ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

分析原因:

由来不详,知道了补上

消除方案一:

 [email protected]:~# find / -name mysql.sock
 /tmp/mysql.sock
 [email protected]:~# mysql -u root -p -S /tmp/mysql.sock
 Enter password:
 Welcome to the MySQL monitor. Commands end with ; or g.
 Your MySQL connection id is 1
 Server version: 5.6.15-log Source distribution

 Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

 Oracle is a registered trademark of Oracle Corporation and/or its
 affiliates. Other names may be trademarks of their respective
 owners.

 Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

 mysql>

消除方案二:

 [email protected]:~# find / -name mysql.sock
 /tmp/mysql.sock
 [email protected]:~# vi /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0

# 加上下面的这段代码即可
[mysql]
socket=/tmp/mysql.sock

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[email protected]:~# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 3
Server version: 5.6.15-log Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql>

如上便是本文的全体内容,希望对大家的上学抱有补助,也愿意我们多多协理帮客之家。

mysql服务运转,可是接连不上,怎么样化解? 登录报错: [email protected]:~# mysql -u root -p Ente...

编辑:mg 本文来源:【mg】mysql化解办法,1130错误消除措施

关键词: