侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130558 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

【服务器搭建环境配置】mysql安装 问题解决方案

2023-12-21 星期四 / 0 评论 / 0 点赞 / 89 阅读 / 1671 字

一、安装 http://jingyan.baidu.com/article/425e69e6bbc6c7be14fc1640.html 二、遇到的问题 (1)lost connection to my

一、安装

http://jingyan.baidu.com/article/425e69e6bbc6c7be14fc1640.html

二、遇到的问题

(1)lost connection to mysql server at reading initial communication packet system error:0

http://www.jb51.net/article/51480.htm

启动mysql 报错:

(2)ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

1、先查看 /etc/rc.d/init.d/mysqld status 看看MySql是否已经启动.

2、确定你的mysql.sock是不是在那个位置,
      mysql -u 你的mysql用户名 -p -S /var/lib/mysql/mysql.sock

3、试试:service mysqld start (我遇到的是这种情况)

4、如果是权限问题,则先改变权限 #chown -R mysql:mysql /var/lib/mysql

[root@localhost ~]# /etc/init.d/mysqld start启动 MySQL: [ 确定 ][root@localhost ~]# mysql -uroot -p

(3)host 'xxx.xx.xxx.xxx' is not allowed to connect to this mysql server

mysql> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'    ->     WITH GRANT OPTION;mysql> CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass';mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'    ->     WITH GRANT OPTION;

(3)1405-Access denied for user (using password: YES)

ip没有访问权限

参考链接

use mysql;select host, user from user;

 

广告 广告

评论区