Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Related Learning of MySQL instruction knowledge

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The following mainly brings you the relevant learning of MySQL instruction knowledge. I hope these contents can bring you practical use, which is also the main purpose of this article that I edit the knowledge of MySQL instruction. All right, don't talk too much nonsense, let's just read the following.

Landing command

C:\ Program Files\ MySQL\ MySQL Server5.7\ bin > mysql.exe-h 120.77.155.115-P 3316-u

Root-p

View all current users

Select distinct concat ('User:''',user,'''@''',host,''':') as query from mysql.user

View the user's permissions

Select * from mysql.user where user='root'\ G

Modify configuration file / etc/my.cnf slow query

Slow_query_log = 1

Slow_query_log_file = / mysql_slow_query.log

Command settin

Set global slow_query_log=1

View modification status

Show global status like'% slow%'

Test slow query

SELECT SLEEP (10)

general knowledge

/ *. * / comments are the same in most languages. The statements in this are not executed.

In order to be compatible with previous versions, MySQL adds an exclamation point after / * to indicate that the statement will also be executed

/ *! select * from test*/

/ * 50001 select * from test * /

The 50001 here indicates that the statement will only be implemented if the database is version 5.00.01 or above.

For the above knowledge of MySQL instructions related to learning, we do not think it is very helpful. If you need to know more, please continue to follow our industry information. I'm sure you'll like it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report