Two methods to implement Mysql remote connection configuration When we work in the company, we often encounter MySQL databases stored on someone's computer. If we want to connect to the MySQL service, the computer with the MySQL service installed must open a remote connection. The first one: root@ubuntu:/usr/local/MySQL# mysql -hlocalhost -uroot -proot; mysql>use mysql; mysql>insert into user ( host, user, password, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv, Create_user_priv, Event_priv, Trigger_priv, Create_tablespace_priv )VALUES ( '%', //Fixed IP replaces % 'cap', password('cap'), 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y' ); mysql> FLUSH PRIVILEGES; Second type: root@ubuntu:/usr/local/mysql#mysql -hlocalhost -uroot -proot; mysql>GRANT ALL PRIVILEGES ON *.* TO 'test'@'%'IDENTIFIED BY 'test' WITH GRANT OPTION; //Replace % if using fixed IP mysql> FLUSH PRIVILEGES; Thank you for reading, I hope it can help you, thank you for your support of this site! You may also be interested in:
|
<<: Detailed explanation of how to exit Docker container without closing it
>>: Two ways to use react in React html
Table of contents Overview 1. Compositon API 1. W...
This article uses examples to explain the concept...
There is a requirement for a list containing mult...
I use Navicat as my database tool. Others are sim...
Mac latest version of MySQL 8.0.22 password recov...
Table of contents 1. Introduction 2. GitHub 3. Ba...
Note: There was no error in the project startup d...
Table of contents 1. Rendering 2. Bind data and a...
Table of contents 1.0 Introduction 2.0 Docker Ins...
Navigation, small amount of data table, centered &...
Table of contents Safe Mode Settings test 1. Upda...
difficulty Two mask creation of svg graphics Firs...
We don’t often encounter 404 pages when we browse...
Preview versions of Safari (Technology Preview 10...
CJK is the abbreviation of CJK Unified Ideographs...