1.ubuntu 18.04 下mysql的安装

sudo apt install mysql-server

2.mysql 安装配置

sudo mysql_secure_installation

参考配置

#1
VALIDATE PASSWORD PLUGIN can be used to test passwords...
Press y|Y for Yes, any other key for No: N (我的选项) #2
Please set the password for root here...
New password: (输入密码)
Re-enter new password: (重复输入) #3
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them...
Remove anonymous users? (Press y|Y for Yes, any other key for No) : N (我的选项) #4
Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network...
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y (我的选项) #5
By default, MySQL comes with a database named 'test' that
anyone can access...
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : N (我的选项) #6
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y (我的选项)

3.配置root用户远程访问

GRANT ALL PRIVILEGES ON *.* TO 'root'@"%" IDENTIFIED BY "123456";

4.这个时候可能远程访问还是有问题,拒绝链接(111)

这时需要找到配置文件中的这一行,把它注释掉(这个让我搞了一晚上)

#bind-address            = 127.0.0.1

此时就可以成功远程链接了。

ubuntu18.04中mysql的安装及远程连接配置的更多相关文章

  1. ubuntu下MySQL的安装及远程连接配置(转)

    1.命令窗口中输入sudo apt-get install mysql-server mysql-client 即可(配置文件位置:/etc/mysql/my.cnf 启动文件位置:/etc/init ...

  2. Oracle客户端的安装与远程连接配置

    在继续Oracle客户端的安装之前,需要分析一下Oracle客户端与数据库服务器之间的连接机制. 一.Oracle客户端与服务器端的通讯机制 1.Oracle Net协议 如下图所示,Oracle通过 ...

  3. ubuntu18.04中安装iNode

    title: ubuntu18.04中安装iNode toc: false date: 2018-09-01 17:52:20 categories: methods tags: ubuntu iNo ...

  4. 在ubuntu18.04中安装opencv_contrib-3.2.0采坑教程

    由于最近要在OpenCV3中使用SIFT和SURF特征提取,而自从OpenCV2升级到OpenCV3版本后,SIFT.SURF等这些算法都被移出opencv默认项目库,而被放到叫opencv_cont ...

  5. Ubuntu18.04中安装Python3.7教程

    Ubuntu18.04中安装Python3.7教程 链接https://blog.csdn.net/weixin_42056625/article/details/82970358

  6. Ubuntu16.04中Mysql 5.7 安装配置

    记录在Ubuntu 16.04安装Mysql 5.7时遇到的一些问题. Mysql安装 使用如下命令进行安装: 1 sudo apt-get install mysql-server mysql-cl ...

  7. ubuntu18.04下mysql安装时没有出现密码提示

    前言: 一:配置 ubuntu 18.04 mysql 5.7.30 二:问题 ubuntu18.04下mysql安装时没有出现密码提示,安装后自己有一个默认的用户名以及密码 解决方案: 1. 在终端 ...

  8. linux安装mysql全纪录[包括yum和rpm安装,编码,远程连接以及大小写问题]

    linux安装mysql全纪录[包括yum和rpm安装,编码,远程连接以及大小写问题] 一.查看mysql是否已经安装 使用“whereis mysql”命令来查看mysql安装路径: [root@h ...

  9. 阿里云centos中mysql的安装及一些常识知识

    -------------------------------------------------------------------    阿里云centos中mysql的安装 工具WinSCP v ...

随机推荐

  1. EASYARM-IMX283 制作ubifs文件系统

    ubifs主页:http://www.linux-mtd.infradead.org/doc/ubifs.html nandflash上常用的文件系统有jffs2.yaffs和ubifs,其中ubif ...

  2. js中的window.open返回object的错误

    系统中用javascript中的window.open后,页面返回了一个[object].因为系统的原因,必需使用href="javascript:window.open()"这样 ...

  3. 详解Java异常Throwable、Error、Exception、RuntimeException的区别

    在Java中,根据错误性质将运行错误分为两类:错误和异常. 在Java程序的执行过程中,如果出现了异常事件,就会生成一个异常对象.生成的异常对象将传递Java运行时系统,这一异常的产生和提交过程称为抛 ...

  4. JS事件派发器EventEmitter

    原文地址:http://zhangyiheng.com/blog/articles/js_event_mitter.html 需求 随着Browser客户端JS越来越复杂,MVC(Client端)设计 ...

  5. 分享知识-快乐自己:JAVA中的 Iterator 和 Iterable 区别

    java.lang.Iterable  java.util.Iterator  Iterator是迭代器类,而Iterable是接口. 好多类都实现了Iterable接口,这样对象就可以调用itera ...

  6. unity3d mvvm c#

    using UnityEngine; using System.Collections; public interface IState { void BeforEnter(); void Befor ...

  7. sed 中带变量的情况

    #teststr="IBM" #sed -n '/' "$teststr" '/=' testfile.txt 在sed中使用变量 通常,我们使用sed进行变量 ...

  8. POJ2657Comfort(扩展欧几里得基础)

    A game-board consists of N fields placed around a circle. Fields are successively numbered from1 to ...

  9. zero to one (2)

    kali虚拟机整理 关于kali的虚拟机,我搞崩过很多次,重新安装了很多次,也遇到了很多问题,有一些解决不了的就重新安装,费时费力,要善于用虚拟机. 关于网络配置的问题 关于网络配置,在这里我想主要记 ...

  10. bzoj 5281 [Usaco2018 Open]Talent Show——0/1分数规划

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=5281 把分子乘1000,就能在整数里做了. 这种水题也花了这么久…… #include< ...