Copyright statement: This article is the original article of the blogger and follows the CC 4.0 BY-SA copyright agreement. Please attach the original source link and this statement for reprinting.
Link to this article: https://blog.csdn.net/qq_37933685/article/details/80687280
Personal blog: https://suveng.github.io/blog/
I use the ova virtual machine image provided by the official kali. After it has been installed MySQL, what we often face is to use the client to connect remotely, and considering the security issues, we will not Use root user.
Therefore, the next step is to organize new users and authorize them to allow clients to log in and access.
1、 ubuntu connect to mysql database
Enter the root user password set during installation.
2、 Switch to mysql database
3、 Authorize new users
Note: (1) "%" wants to connect to this Mysql
The IP address of the client side of the database can be modified as required. % Means all ip can be connected
(2) password is the password of the Mysql database test user, which needs to be modified according to the actual situation
5、 Modify MySQL configuration file
/etc/mysql/my.cnf file, find bind-address = 127.0.0.1
Comment out the line bind-address = 127.0.0.1, that is, modify it to:
6、 Restart the MySQL service
7、 Use the connection tool to try to connect.
Recommended Posts