1. mysql安装以后无法登陆的的解决方法((ERROR 1698 (28000): Access denied for user 'root'@'localhost'))

    解决步骤:

    [====>>https://www.cnblogs.com/leolztang/p/5094930.html
    .sudo mysql -u root -p
    .select user, plugin from mysql.user;
    .update mysql.user set authentication_string=PASSWORD('newPwd'), plugin='mysql_native_password' where user='root';
    .flush privileges;
    .exit

    6.重启进入

    1. 删除mysql

    a. sudo apt-get autoremove --purge mysql-server-5.0
    b. sudo apt-get remove mysql-server
    c. sudo apt-get autoremove mysql-server
    d. sudo apt-get remove mysql-common (非常重要)

    上面的其实有一些是多余的,建议还是按照顺序执行一遍

    2. 清理残留数据

    dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P

    3. 安装 mysql

    a. sudo apt-get install mysql-server
    b. sudo apt-get install mysql-client
    c. sudo apt-get install php5-mysql(安装php5-mysql是将php和mysql连接起来 )

    一旦安装完成,MySQL服务器应该自动启动。您可以在终端提示符后运行以下命令来检查 MySQL 服务器是否正在运行:

    4. 检查Mysql是否正在运行

    sudo netstat -tap | grep mysql

    当您运行该命令时,您可以看到类似下面的行:

    root@ubuntu:~# sudo netstat -tap | grep mysql
    tcp localhost.localdo:mysql *:* LISTEN
    /mysqld

    如果服务器不能正常运行,您可以通过下列命令启动它:

    sudo /etc/init.d/mysql restart

    打开mysql:

    sudo mysql

    本文主要摘自:https://blog.csdn.net/wsywb111/article/details/78901889

mysql安装以后无法登陆的的解决方法((ERROR 1698 (28000): Access denied for user 'root'@'localhost'))的更多相关文章

  1. ERROR 1698 (28000): Access denied for user 'root'@'localhost' 解决方法

    之前MySQL服务端本机上使用密码登陆root账号是没有问题的,但是今天不知道是因为动了哪里,登陆失败并有这个错误代码: ~$ mysql -u root -p Enter password: ERR ...

  2. Ubuntu下使用mysqli-connect连接mysql时报错:ERROR 1698 (28000): Access denied for user 'root'@'localhost'

    LNMP安装好后,写了个index.php文件,里面的内容很简单,就是想测试php与mysql的通信是否正常,代码如下: <?php $host = 'localhost'; $user = ' ...

  3. Ubuntu16.04 ERROR 1698 (28000): Access denied for user 'root'@'localhost' 解决流程

    mysql版本 5.7.22 安装完成后出现问题 ERROR 1698 (28000): Access denied for user 'root'@'localhost' 可能是因为初始密码为空:按 ...

  4. MySQL使用普通用户访问返回ERROR 1698 (28000): Access denied for user 'root'@'localhost'

    这个问题最开始查资料都说要改密码,密码不对.其实不是这个样子都. 解决方法 修改/etc/mysql/my.cnf,添加以下内容 [mysqld] skip-grant-tables 重启mysql服 ...

  5. MySQL5.7使用错误解决:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)【取消或重设root密码】

    解决方法: 最简单方法: ⑴打开mysql中的my.ini(如果没有就将my-default.ini复制一份,并修改为my.ini): ⑵在[mysqld]下面空白行直接添加skip-grant-ta ...

  6. ubuntu下 mysql安装以后无法登陆的的解决方法((ERROR 1698 (28000): Access denied for user 'root'@'localhost'))

    1. 删除mysql sudo apt-get autoremove --purge mysql-server-5.0 sudo apt-get remove mysql-server sudo ap ...

  7. MySQL ERROR 1698 (28000): Access denied for user 'root'@'localhost'

    今天在安装MySQL的过程中竟然没有让我输入密码,登录的时候也不需要密码就能进入,这让我很困惑. 进了数据库就设置密码,用了各种方式都不行. 虽然我这数据库没啥东西但也不能没有密码就裸奔啊,有点丢人是 ...

  8. 解决ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)【亲测有效】

    文件转自:https://blog.csdn.net/hua1011161696/article/details/80666025 问题:(MySQL 5.6社区版windows版) 忘记密码或其他一 ...

  9. mysql 安装完毕后登陆不了mysql的 shell 即mysql&gt;遇到:ERROR 1045 (28000): Access denied for user 'root'@'localhost‘

    [root@hzswtb2-mpc ~]# mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using pas ...

随机推荐

  1. Trapping Rain Water——经典的双边扫描问题

    Given n non-negative integers representing an elevation map where the width of each bar is 1, comput ...

  2. 访问Github慢的解决办法

    http://blog.csdn.net/sunsteam/article/details/63253933 http://tool.chinaz.com/dns 151.101.196.249  g ...

  3. 原生DOM选择器querySelector和querySelectorAll

    在传统的 JavaScript 开发中,查找 DOM 往往是开发人员遇到的第一个头疼的问题,原生的 JavaScript 所提供的 DOM 选择方法并不多,仅仅局限于通过 tag, name, id ...

  4. AC日记——文化之旅 洛谷 P1078

    文化之旅 思路: 暴搜,倒搜: 代码: #include <bits/stdc++.h> using namespace std; #define maxn 105 #define max ...

  5. gulp配合vue压缩代码格式化

    实际项目就是一个单页面.因此,我觉得用gulp足够,并且不需要webpack和vue-cli因为没有必要使用组件. 先来说一下项目结构 1. 然后来看看我的包管理package.json都用了啥,你也 ...

  6. Linux各发行版本及其软件包管理方法

    Linux发行版本有很多,按照使用领域分为桌面系统领域和服务器领域.下面简要介绍如下: 1.Red Hat和Fedora:redhat最早发行的个人版本的Linux,自从Red Hat 9.0版本发布 ...

  7. Centos7 Elasticsearch部署

    (1)ELKStack简介 1.elk介绍 ELK Stack包含:ElasticSearch.Logstash.Kibana ElasticSearch是一个搜索引擎,用来搜索.分析.存储日志.它是 ...

  8. 拜拜了,GOPATH君!新版本Golang的包管理入门教程

    Go 1.11和1.12实现了对包管理的初步支持,Go的新依赖管理系统使依赖版本信息明确且易于管理.Using Go Modules - The Go Blog 新的包管理模式有什么不同? 作为Go语 ...

  9. getResourceAsStream 地址

    getResourceAsStream ()返回的是inputstream getResource()返回:URL Class.getResource("")    返回的是当前C ...

  10. Memory Allocation with COBOL

    Generally, the use of a table/array (Static Memory) is most common in COBOL modules in an applicatio ...