ubuntu 16.04 和 windows 10系统安装mysql 允许远程访问 | mysql user guide on ubuntu 16.04 and windows 10
本文首发于个人博客https://kezunlin.me/post/36e618e7/,欢迎阅读!
mysql user guide on ubuntu 16.04 and windows 10
Part-1: Ubuntu
install
sudo apt-get install mysql-server
# root,123456
mysql -uroot -p123456
allow remote access
change bind-address
cd /etc/mysql
grep -r 'bind-address' .
./mysql.conf.d/mysqld.cnf:bind-address = 127.0.0.1
change bind-address to 0.0.0.0
vim ./mysql.conf.d/mysqld.cnf
bind-address = 0.0.0.0
# or
sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/mysql.conf.d/mysqld.cnf
# restart
service mysql restart
grant users
mysql> grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
mysql> flush privileges;
check for users.
mysql> use mysql;
mysql> select user,host from user;
+------------------+-----------+
| user | host |
+------------------+-----------+
| root | % |
| debian-sys-maint | localhost |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
+------------------+-----------+
5 rows in set (0.00 sec)
OK. Now we can access mysql from remote machine.
Test connection
mysql -uroot -p123456 -h 192.168.0.130
Part-2: Windows
install mysql server 5.7
OK
allow remote access
grant users
mysql> grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
mysql> flush privileges;
close fireware
close fireware and allow 3306 tcp connection.
Test connection
mysql -uroot -p123456 -h 192.168.0.130
or by mysql client.
Reference
History
- 20180124: created.
- 20180308: add windows part.
Copyright
- Post author: kezunlin
- Post link: https://kezunlin.me/post/36e618e7/
- Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 3.0 unless stating additionally.
ubuntu 16.04 和 windows 10系统安装mysql 允许远程访问 | mysql user guide on ubuntu 16.04 and windows 10的更多相关文章
- 轻松学习之Linux教程一 ubuntu14.04+windows双系统安装
本系列文章由@uid=hpw" style="color:rgb(255,0,0)">超人爱因斯坦出品.转载请注明出处. 文章链接:http:// ...
- win7 64 + Ubuntu 14.04.1 64双系统安装,详解UEFI ~ GPT和legacy ~ MBR区别
win7 64 + Ubuntu 14.04.1 64双系统安装 背景:我的笔记本之前的系统是window 7 64 + Ubuntu 14.04.1,用UEFI引导系统.安装过程是先装的win7,再 ...
- Windows 10搭建Apache2.4 + PHP7 + MySQL环境
一.准备 1.资源 Apache https://www.apachelounge.com/download/ PHP http://windows.php.net/download#php-7.0 ...
- Ubuntu 12.04 和 Win7 双系统安装
Thinkpad T400上成功安装双系统 安装Win7 使用光盘按步骤安装,到这里是一个没有分区的硬盘,做了如下分区: 100M(系统保留),40G(C盘),60G(D盘),80G(E盘),52G( ...
- MySQL 在Docker下快速安装(Ubuntu 16.4)
采用dockerhub安装 docker run -p 3306:3306 --name mysql -v /mydata/mysql/log:/var/log/mysql -v /mydata/my ...
- Ubuntu16.04环境下搭建基于三台主机的mysql galera cluster集群(实测有效)
(注意: (1)文中红色字体部分不一定需要操作 (2)由于word文档编辑的原因,实际操作时部分命令需要手动输入!!直接复制粘贴会提示错误!! ) 一 搭建环境: 1 Ubuntu16.04版本(系 ...
- windows 7 64bit 下apache php mysql 环境配置
在64位环境下安装apache,php和配置过程 准备好安装包.(64位版本) Apache 下载地址:http://www.apachelounge.com/download/ Php 下载地址:h ...
- Windows XP系统安装SQL Server 2005(开发版)图解
转自Windows XP系统安装SQL Server 2005(开发版)图解 安装前提:由于有些从网上的下载的项目需要导入SQL Server 2005的数据文件,因此,今天便安装了这个数据库,我的系 ...
- ubuntu环境下lnmp环境搭建(1)之Mysql
1. vm下安装Ubuntu 1)下载镜像ubuntu-15.04-desktop-amd64.iso http://yunpan.cn/cF5dwV6zw33ef 访问密码 ecba(个人分享在36 ...
随机推荐
- 2,手动创建CAD二次开发项目--AutoCAD二次开发(2020版)
本项目使用手动创建,意为不使用SDK模板. 从Visual Studio的“文件”下拉菜单中,选择“新建”->“项目...”. 在出现的“新建项目”对话框的“项目类型:”树中,单击“ Visua ...
- 百万年薪python之路 -- 面向对象之 反射,双下方法
面向对象之 反射,双下方法 1. 反射 计算机科学领域主要是指程序可以访问.检测和修改它本身状态或行为的一种能力(自省) python面向对象中的反射:通过字符串的形式操作对象相关的属性.python ...
- windows下Python开发错误记录以及解决方法
windows下使用pip提示ImportError: cannot import name 'main' 原因:将pip更新为10.0.0后库里面的函数有所变动造成这个问题 解决方法:先卸载现在的p ...
- 斯坦福机器学习课程 Exercise 习题三
Exercise 3: Multivariate Linear Regression 预处理数据 Preprocessing the inputs will significantly increas ...
- spring源码学习(二)
本篇文章,来介绍finishBeanFactoryInitialization(beanFactory);这个方法:这个方法主要是完成bean的实例化,invokeBeanFactoryPostPro ...
- html获得当前日期
<html> <head> <title> </title> </head> <body> <!-- 获得当前日期(年月日 ...
- 通过Value获取Map中的键值Key的四种方法
1 简介 我们都知道Map是存放键值对<Key,Value>的容器,知道了Key值,使用方法Map.get(key)能快速获取Value值.然而,有的时候我们需要反过来获取,知道Value ...
- sqlmap日常使用
收集的一些技巧资源来之互联网 -u #注入点 -f #指纹判别数据库类型 -b #获取数据库版本信息 -p #指定可测试的参数(?page=1&id=2 -p "page,id&qu ...
- 【实用工具】这些你不得不知道的chrome插件,让你事半功倍
平时chrome插件用多了,发现在工作中有很多插件特别好用,让你事半功倍.于是我抽时间整理了一些非常好用的chrome插件分享给大家,其中有些插件是我已经离不开,每天都在用的.希望这篇文章能帮助你找到 ...
- Maven/Docker快速搭建RocketMQ
官方文档 [https://rocketmq.apache.org/docs/quick-start/] ①:Bin_二进制安装版 1. 环境准备 系统环境:Centos7 x64 JDK:jdk-8 ...