UBUNTU16.04 mysql 安装与配置
来源:互联网 发布:anywhere2 mac 蓝牙 编辑:程序博客网 时间:2024/06/10 17:50
1、安装命令:
sudo apt-get install mysql-server
上述命令会安装以下包:
apparmor
mysql-client-5.7
mysql-common
mysql-server
mysql-server-5.7
mysql-server-core-5.7
因此无需再安装mysql-client等。安装过程会提示设置mysql root用户的密码,设置完成后等待自动安装即可。默认安装完成就启动了mysql。
2、启动和关闭mysql服务器:
service mysql startservice mysql stop
3、确认是否启动成功:
sudo netstat -tap | grep mysql
4、登录MYSQL:
mysql -u root -p
5、配置远程访问a、编辑配置文件
sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf 将bind-address = 127.0.0.1注释
b、修改用户权限
登录MySQL:mysql -u root -p --远程访问 mysql -h 192.168.0.201 -P 3306 -u root -p123 123为root用户密码
用户权限:grant all on *.* to root@'%' identified by '1'; --添加一个用户名是root且密码是1的远程访问用户
刷新:flush privileges;
查看是否添加成功:select user,host,authentication_string from user; --在5.7中用户密码是列authentication_string
退出:quit
c、重启MySQL服务
/etc/init.d/mysql restart
阅读全文
0 0
- UBUNTU16.04 mysql 安装与配置
- Ubuntu16.04下MySQL的安装与配置(UTF8)
- Ubuntu16.04中MySQL安装配置
- Ubuntu16.04 下安装 MySQL 及配置
- Ubuntu16.04中MySQL安装配置
- Ubuntu16.04中MySQL安装配置
- Ubuntu16.04中MySQL安装配置
- ubuntu16.04安装mysql
- Ubuntu16.04安装mysql
- Ubuntu16.04安装mysql
- ubuntu16.04安装mysql
- Ubuntu16.04安装mysql
- Ubuntu16.04安装mysql
- ubuntu16.04安装mysql
- Ubuntu16.04中MySQL安装配置及修改字符集编码
- Ubuntu16.04服务器安装配置MySQL并开启远程连接
- Ubuntu16.04LTS配置Mysql
- ubuntu16.04下virtualenv环境中, django与mysql安装
- 【更新】Spire.PDF for .NET V3.9.285发布 | 支持将PDF转换为HTML
- Linux 常用命令笔记
- java8
- IDEA 安装 mybatis-plugin并破解
- SVN在Android Studio中的配置
- UBUNTU16.04 mysql 安装与配置
- 剑指offer--翻转单词顺序列
- 利用百度API实现手机导航
- linux 常规命令
- 8.15 J
- Python3 打印26个英文字母
- A Microservice Architecture with Spring Boot and Spring Cloud(三)
- [leetcode]154. Find Minimum in Rotated Sorted Array II@Java解题报告
- linux cp 命令大全