Today, you need to configure trixbox web services to access databases on another machine. You must use the permissions granted to mysql users. Something you did not want to learn
I had to use it. By the way, copy the content in the White Paper for future reference. An example is as follows:
Grant all on *. * To asteriskuser @ "%" identified by 'amp109 ';
Flush privileges;
The syntax of the grant statement is as follows:
Grant privileges (columns)
On what
To user identifiedby "password"
With grant option
User authorization
Mysql> grant rights on database. * to user @ host identified by "pass ";
Example 1:
Add a user named "test1" with the password "ABC" so that he can log on to any host and have the permission to query, insert, modify, and delete all databases.
Grant select, insert, update, delete on *. * To mailto: test1 @ % 22% 25 "identified by" ABC ";
*. * In the on Clause indicates "all databases, All Tables"
Example 2:
Add a user named Test2 "ABC" so that the user can only log on to localhost and query, insert, modify, and delete the Database "mydb.
Grant select, insert, update, delete on mydb. * To Test2 @ localhost identified by "ABC ";
Example 3
Add a User custom to connect from the host localhost, server. domain, and whitehouse.gov. He only wants to access the bankaccount database from localhost, the expenses database from whitehouse.gov, and the customer database from all three hosts. He wants to use the password stupid from all three hosts.
To use the grant statement to set permissions for individual users, run these commands:
Shell> MySQL -- user = root MySQL
Mysql> grant select, insert, update, delete, create, drop
On bankaccount. * to custom @ localhost identified by 'topid ';
Mysql> grant select, insert, update, delete, create, drop
On expenses. * To custom@whitehouse.gov identified by 'stupid ';
Mysql> grant select, insert, update, delete, create, drop
On customer. * To mailto: Custom @ '% 25' identified by 'stupid ';
========================================================== ======
Permission information is stored in the MySQL database using the user, DB, host, tables_priv, and columns_priv tables ).
Permission column Context
Select select_priv table
Insert insert_priv table
Update update_priv table
Delete delete_priv table
Index index_priv table
Alter alter_priv table
Create create_priv database, table, or index
Drop drop_priv database or table
Grant grant_priv database or table
References references_priv database or table
Reload reload_priv Server Management
Shutdown shutdown_priv Server Management
Process process_priv Server Management
File file_priv file access on the server
1.
Select, insert, update, and delete permissions
It is the basic permission to allow you to perform operations on an existing table in a database.
2.
Alter permission allows you to use ALTER TABLE
3.
The create and drop permissions allow you to create new databases and tables, or discard (delete) existing databases and tables.
If you grant the drop permission of the MySQL database to a user, the user can discard the database that stores the MySQL access permission!
4.
Grant permissions allow you to grant your own permissions to other users.
You cannot explicitly specify that a given user should be denied access. That is, you cannot explicitly match a user and then reject the connection.
You cannot specify a user with the right to create or discard a table in a database, nor create or discard the database itself.
You can list multiple granted permissions at the same time.
For example, if you want to allow users to read and modify the content of an existing table, but do not allow users to create or delete a new table, perform the following authorization:
Grant select, insert, delete, update on samp_db. * To mailto: user @ % 25
Identifiedby "pass"