1.安装mysql
  更新仓库:sudo apt-get update
  安装:sudo apt-get install mysql-server mysql-client
  问题:安装mysql5.7的过程中 无root密码设置提示 直接安装完成结束
2.不知道密码状态下打开mysql
  查询mysql是否运行:sudo netstat -tap |grep mysql
  (有显示就表示已运行)
  备注:mysql 打开(service mysql start) 关闭(service mysql stop) 重启命令(service mysql restart)
  查询默认的用户名和密码:sudo cat /etc/mysql/debian.cnf
        baiguo@baiguo-PC:~$ sudo cat /etc/mysql/debian.cnf 
        # Automatically generated for Debian scripts. DO NOT TOUCH!
        [client]
        host     = localhost
        user     = debian-sys-maint
        password = F64nKZ233QkzL8v9
        socket   = /var/run/mysqld/mysqld.sock
        [mysql_upgrade]
        host     = localhost
        user     = debian-sys-maint
        password = F64nKZ233QkzL8v9
        socket   = /var/run/mysqld/mysqld.sock
   备注:这样比较麻烦,无法复制密码,可以直接打开你的文件管理器,用管理员身份打开debian.cnf即可查看复制密码
   利用默认账户进行登录:mysql -u debian-sys-maint -p(文件中的密码,与p之间不要有空格)
3.进入mysql修该密码
        这句必须:update mysql.user set plugin="mysql_native_password" where user="root";
        设置root账户密码:update mysql.user set authentication_string=password('这里是你的密码') where user='root'and Host = 'localhost';
4.退出数据库
        exit
        重新启动数据库

sudo service mysql restart

用自己设置好的密码登录

mysql -u root -p

输入密码,成功登录,如下.

baiguo@baiguo-PC:~$ mysql -u root -p
        Enter password: 
        Welcome to the MySQL monitor.  Commands end with ; or \g.
        Your MySQL connection id is 4
        Server version: 5.7.21-1 (Debian)

Copyright (c) 2000, 2018, 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>

原文链接:https://bbs.deepin.org/forum.php?mod=viewthread&tid=169658

deepin mysql安装的更多相关文章

  1. deepin MySQL 安装以及编码格式的修改utf-8

    deepin MySQL 安装以及编码格式的修改utf-8: 1.sudo apt-get install mysql-server mysql-client 2.sudo mysql -u root ...

  2. linux Mysql 安装及配置

    1.准备 cmake-3.6.0.tar.gz bison-3.0.4.tar.gz mysql-5.7.13.tar.gz (http://dev.mysql.com/get/Downloads/M ...

  3. mysql安装一 --- 源码包安装

    1.登陆http://www.mysql.com/ 或者 www.oracle.com 2. 3. 4. 上面如果不能加载,禁用代理软件 5. 6. 7. 8. 9.上传 10.md5校验安装包的完整 ...

  4. Ubuntu14.04 Django Mysql安装部署全过程

    Ubuntu14.04 Django Mysql安装部署全过程   一.简要步骤.(阿里云Ubuntu14.04) Python安装 Django Mysql的安装与配置 记录一下我的部署过程,也方便 ...

  5. mysql 安装问题

    针对免安装版的mysql: 1.启动CMD,在mysql安装目录下  ~\bin\目录下,输入: mysqld -install   安装msyql服务: 2.启动MySQL服务,输入: net st ...

  6. 001.mysql安装(lnmp)

    mysql官方网站:http://dev.mysql.com/downloads/ Linux环境:刚安装的32位的“最小化安装“的CentOS 6.7 mysql版本:本次实验安装的是mysql5. ...

  7. MySQL安装步骤

    MySQL安装步骤 1. 下载MySQL Community Server 5.6.21,注意选择系统类型(32位/64位) 2. 解压MySQL压缩包 将以下载的MySQL压缩包解压到自定义目录下. ...

  8. mysql安装配置

    MySQL 是最流行的关系型数据库管理系统,由瑞典MySQL AB公司开发,目前属于Oracle公司. MySQL所使用的SQL语言是用于访问数据库的最常用标准化语言. MySQL由于其体积小.速度快 ...

  9. LNMP平台搭建---MySQL安装篇

    在前两篇中,安装了一个基本的Web服务器,但是只能提供静态网页查看,要做成动态网站,就必须要数据库或其他编程语言支持了,这里先介绍MySQL数据库的安装. MySQL是一个开源的数据库,在互联网行业应 ...

随机推荐

  1. 【校招面试 之 C/C++】第15题 C 回调函数

    转自:https://segmentfault.com/a/1190000008293902 做略微改动 什么是回调函数 我们先来看看百度百科是如何定义回调函数的: 回调函数就是一个通过函数指针调用的 ...

  2. nginx 的 upstream timed out 问题

    nginx 作为负载服务,表现为网站访问很慢,有些文件或页面要等待到60s才会返回,我注意到60s就是超时时间,但是超时后返回状态是正常值200,网站可以正常打开,就是会一直等待到超时才打开,而且问题 ...

  3. NPOI创建doc

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...

  4. 什么是springMvc的参数绑定?

    参数绑定通俗来讲就是从页面传过来的数据通过SpringMvc进行接收.接收的数据类型可以有: (1)SpringMvc默认支持的类型:request.session.application等. (2) ...

  5. 【转】HttpApplication的认识与加深理解

    原文:http://www.cnblogs.com/whtydn/archive/2009/10/16/1584584.html HttpApplication对象是经由HttpApplication ...

  6. Linux 模块管理

    查看模块信息 modinfo module-name 加载模块 insmod module-name 卸载模块 rmmod module-name 生成模块依赖 cd /lib/module/`una ...

  7. git 一些提交等用法

    从服务器上下载项目到em_cesium:git clone ssh://kjwang@code-bj.clustertech.com:29418/em-satdata em_cesium 在本地新建一 ...

  8. 建表Table

    Sstudent表   学  号    Sno  姓  名   Sname   性  别    Ssex     年  龄      Sage   所 在 系    Sdept   200215121 ...

  9. asp.net core 2.1 增加Nlog日志到sql server数据库

    一.增加引用 <PackageReference Include="NLog.Extensions.Logging" Version="1.2.1" /& ...

  10. eclipse怎样检出SVN项目

    首先确定你的eclipse安装了svn插件.查看eclipse是否安装插件的方法:打开eclipse->文件->新建->其他 ,在弹出的选择向导窗口中如果能搜索到svn,说明ecli ...