本文主要是介绍mysql root 远程登陆,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
mysql root 远程登陆
- 1,安装mysql
1,安装mysql
- 系统版本
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
mysql
数据库安装
安装完毕会自动启动运行,mysql -uroot
登陆没有密码
apt-get install mysql-server -y
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
mysql> show tables;
mysql> select Host,User,authentication_string,plugin from user;
+-----------+------------------+-------------------------------------------+-----------------------+
| Host | User | authentication_string | plugin |
+-----------+------------------+-------------------------------------------+-----------------------+
| % | root | | mysql_native_password |
| localhost | mysql.session | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password |
| localhost | mysql.sys | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password |
| localhost | debian-sys-maint | *E460C32D52ABA34517AEC7065EAB93774AB1E612 | mysql_native_password |
+-----------+------------------+-------------------------------------------+-----------------------+
4 rows in set (0.00 sec)
mysql> grant all on *.* to 'root'@'%';
mysql> flush privileges;
参考:
- [Linux系統] ubuntu安装MySQL
- [[Linux系統] ubuntu安裝MySQL時未提示輸入密碼] ubuntu安裝MySQL時未提示輸入密碼
- MySQL 8.0 版本授权 root 远程连接,修改权限,更改加密方式
- 在本地远程连接
- 远程访问服务器上的MySQL数据库
- Mysql ERROR 1698 (28000) 解决
- 解决 MySQL 的 ERROR 1698 (28000): Access denied for user ‘root’@‘localhost’
这篇关于mysql root 远程登陆的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!