在使用yum 安装完mariadb, mariadb-server, mariadb-devel后

1. rpm -qa | grep maria   查看maria相关库的是否在进程中

2. netstat -tulp 查看网络服务软件的进程列表,mysql是否在(yum install net-tools 安装netatat等网络分析工具)

3. mysql_secure_installation    设置安全mysql,设置mysql系统的root权限密码,默认为空

4. 以上当设置密码时出现"access defind for user@'localhost'"类似的错误,则可使用一下方法。

(1). mysql -uroot -p  回车空密码登录进mysql系统

(2). set password for 'root'@'localhost' = password('你的密码'); 当前就设置密码回车

(3). 然后再mysql -uroot -p使用刚才的密码登录进去,show databases; 查看系统系统的数据库列表

5. grant all privileges on *.* to 'root'@'%' identfied by '你的数据库系统密码';   设置mysql的远程连接

grant all privileges on 库名.表名 to '用户名'@'IP地址' identified by '密码' with grant option;

公众号

解决centos7.0安装mysql后出现access defind for user@'localhost'的错误的更多相关文章

  1. centos7 yum安装mysql后启动不起来问题

    [root@localhost ~]# systemctl start mysqld       启动失败 Job for mysqld.service failed because the cont ...

  2. 阿里云安装mysql后查看不到初始密码的解决办法

    在阿里云安装mysql后用grep 'A temporary password' /var/log/mysqld.log命令查看MySQL初始密码,毛线都没有看到,然后直接到/var/log/mysq ...

  3. CentOS7.4安装MySQL踩坑记录

    CentOS7.4安装MySQL踩坑记录 time: 2018.3.19 CentOS7.4安装MySQL时网上的文档虽然多但是不靠谱的也多, 可能因为版本与时间的问题, 所以记录下自己踩坑的过程, ...

  4. Centos7 yum安装mysql

    参考此文档:http://www.jb51.net/article/116032.htm http://www.jb51.net/article/95399.htm 1.在官网下载mysql57-co ...

  5. yum安装mysql后root用户的临时密码

    1.查看root用户临时随机密码 yum 安装mysql后,无法通过空密码登录数据库,如下: [root@ mysql]# mysql -u root -p Enter password: ERROR ...

  6. CentOS7下安装MySQL并配置远程连接

    一.CentOS7下安装MySQL数据库 CentOS7默认的安装包里面已经没有 MySQL-Server安装包了,远程镜像中也没有了. 默认的是MariaDB (MySQL的一个分支,开发这个分支的 ...

  7. linux安装mysql后root无法登录 sql 无法登录

    linux安装mysql后root无法登录 问题:[root@localhost mysql]# mysql -u root -pEnter password: ERROR 1045 (28000): ...

  8. CentOS7 中安装 MySQL

    0. 说明 参考 centos7.2安装MySQL CentOS 7 下 Yum 安装 MySQL 5.7 两种方式安装 MySQL 安装 MySQL(yum) & 安装 MySQL(yum) ...

  9. 【转】CentOS6下安装mysql后,重置root密码方法

    本文转自:CentOS6下安装mysql后,重置root密码方法 centos下安装mysql,居然不知道root用户密码,本想重装,不过还是先度娘了一些,发现这篇文章,刚好解决我的燃眉之急,太赞了. ...

随机推荐

  1. CentOS 7 安装配置 OpenVPN 客户端

    安装 epel yum 源: $ rpm -ivh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm $ ...

  2. 算法与数据结构(三) 二叉树的遍历及其线索化(Swift版)

    前面两篇博客介绍了线性表的顺序存储与链式存储以及对应的操作,并且还聊了栈与队列的相关内容.本篇博客我们就继续聊数据结构的相关东西,并且所涉及的相关Demo依然使用面向对象语言Swift来表示.本篇博客 ...

  3. [Swift]LeetCode416. 分割等和子集 | Partition Equal Subset Sum

    Given a non-empty array containing only positive integers, find if the array can be partitioned into ...

  4. [Swift]LeetCode477. 汉明距离总和 | Total Hamming Distance

    The Hamming distance between two integers is the number of positions at which the corresponding bits ...

  5. [Swift]LeetCode910. 最小差值 II | Smallest Range II

    Given an array A of integers, for each integer A[i] we need to choose either x = -K or x = K, and ad ...

  6. [Swift]LeetCode911. 在线选举 | Online Election

    In an election, the i-th vote was cast for persons[i] at time times[i]. Now, we would like to implem ...

  7. 利用U盘安装win2008r2系统的步骤

    我们在公司或者家里,经常要安装各种系统,最近公司需要重新安装win2008r2系统.折腾了一天的时间,终于把系统装好了.将安装的步骤记录下来,方便大家查看,自己也做个记录. 1 准备win2008r2 ...

  8. Java9发布回顾Java 8的十大新特性

    java9已经在北京时间9月22日正式发布,开发者可以在oracle jdk官网上下载到最新的jdk9. 今天,我们先来一起复习一下2014年发布的Java 8的十大新特性.先来喝杯java~~~ 按 ...

  9. Pycharm使用教程(三)(非常详细,非常实用)

    1. 汉化:把resources_zh.jar拷贝到PyCharm的安装目录下的lib目录,重启Pycharm即可. (resources_zh.jar汉化包关注本账号获取:链接: https://p ...

  10. SignalR学习笔记(一) 简单聊天室

    什么是ASP.NET SignalR? ASP.NET SignalR是一个方便程序员添加实时网络通信功能的类库.所谓的实时网络通信功能(Real-time Web Functionality)就是需 ...