Retrieve Browser Information in Procedure Mysql

Asked

Viewed 52 times

1

You can pick up browser information on a PROCEDURE via Mysql code?

No need to pick up via back-end code and pass as parameter. That is, Mysql has some function that returns information from the browser?

  • 1

    believe that not, why mysql runs on your server so he does not even know who made the request, whether it was by the browser, php, java or direct in the mysql console, for him no matter where it came from.

  • So @Neuberoliveira, I have this question. Because it has the IP reference of the user who did the action, I thought maybe it also has the browser information. But I couldn’t find anything on.

  • This ip that it has either is from your server that made the request, in case your php server, or was some information that you passed through your application to the database

  • Yes @Jefersonalmeida, through the function: "SELECT SUBSTRING_INDEX(USER(), '@', -1)" it returns me the IPV4 address of the user who did the action.

  • @Alan but this ip address is not the address of your php server that made the request to the database or is the ip of the user who did some action on the page?

  • @Jefersonalmeida It is the user ipv4, his internet access ip. This ip is unique for each user.

Show 1 more comment

1 answer

3


This is a conceptual error of yours. Mysql needs a server to run, that is, a computer, which is a node in the computer network.

The browser needs a computer to run, which is also a node on the network.

Each node has a unique "name", which is the IP. Nodes can be routers, Bridges, laptops, mainframes, anyway, anything that can be connected to a computer network, even subnets.

Your browser does not have an IP, it is your computer that owns it.

SQL can be considered a domain-specific language and is primarily used to manipulate data in relational databases.

Nothing prevents, however, that the team that develops Mysql will one day use the main technology (C++) of DBMS to get more information from the client when accessing a Mysql server, provided that authorized by the user.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.