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. Extjs Vbox布局方式,以及align种类,flex,pack属性含义简介

    VBox布局方式,熟悉下一下几个主要属性: 一.align:字符类型,指示组件在容器内的对齐方式.这个是基于容器的左上角来排列的.pack不同,pack是根据容器的最上边来显示的. 1.left(默认 ...

  2. 简述Markdown的使用方法

    MarkdownPad Document Markdown的使用技巧 一.标题 一个”#“表示H1.“##”表示H2... 二.列表 第一点 第二点 注意1.2. -与文本之间要有一个空格 这一点 三 ...

  3. 史上最全的Android开发学习教程集锦【初学者】

    根据Google的报告,截止2017年5月为止,Android活跃用户已超过20亿,并还在持续增长中.Android系统在几个主要的市场上已超过了iOS系统,特别是在美国,欧洲和日本,然而苹果确实在中 ...

  4. socketpair初识

    #include <stdio.h>  #include <string.h>  #include <unistd.h>  #include <sys/typ ...

  5. [转载红鱼儿]Delphi XE7 update1进步太大了

    写以下的文字是怀着无比兴奋的心情写的,急于同朋友们分享XE7的进步! 1.更新的bug列表并不全 通过bug修正列表及发布的消息,可以看到up1修正了很多bug,正如我所说,有些bug并没有写到发布的 ...

  6. 2018.09.30 bzoj2288:生日礼物(贪心+线段树)

    传送门 线段树经典题目. 每次先找到最大子段和来更新答案,然后利用网络流反悔退流的思想把这个最大字段乘-1之后放回去. 代码: #include<bits/stdc++.h> #defin ...

  7. Wifi小车资料

    下位机代码 #include <avr/wdt.h> #include <SoftwareSerial.h> #include <EEPROM.h> //设置系统启 ...

  8. aused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method fai

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'roleDaoImpl' ...

  9. python 求第k个最大数

    #coding = utf-8 import sys def Cal_NO(a,b): nums=sorted(a,reverse=True) result=nums[b-1] return resu ...

  10. qt编程遇到的东西

    setWindowFlags http://blog.chinaunix.net/uid-23500957-id-3876399.html move()方法,的作用是设置QWidget部件的pos坐标 ...