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

Cloud computing learning material framework, msyql advanced operation courseware

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

In this article, we will explain the advanced operation of msyql:

Connect to the database

Mysql-uroot-p-h20.18.44.209-p3306

Authorization

GRANT ALL PRIVILEGES ON. TO 'root'@'%' WITH GRANT OPTION

FLUSH PRIVILEGES

Modify database password

Vim / etc/my.cnf append

Validate_password=off

Systemctl restart mysqld

Method 1:

Mysql > SET PASSWORD FOR user3@'localhost'='new_password'

Mysql > flush privileges

Method 2:

Mysql > update mysql.user set password=password ('newpassword') where user='root'

Mysql > flush privileges

Method 3:

Mysql > set password for 'root'@'localhost'=password (' newpassord')

Compilation and installation requires parameters

[root@mysql-5.7.17] # cmake. \

-DWITH_BOOST=boost_1_59_0/\ specify the boost directory

-DCMAKE_INSTALL_PREFIX=/usr/local/mysql\ specify the installation directory

-DSYSCONFDIR=/etc\ profile location

-DMYSQL_DATADIR=/usr/local/mysql/data\ data directory (very important error log, data storage location)

-DINSTALL_MANDIR=/usr/share/man\ man manual

-DMYSQL_TCP_PORT=3306\ default port 3306

-DMYSQL_UNIX_ADDR=/tmp/mysql.sock\ sock file location, used for network communication

-default support for DDEFAULT_CHARSET=utf8\ character set

-DEXTRA_CHARSETS=all\ character set support extension support

-DDEFAULT_COLLATION=utf8_general_ci\ character set support sets default collation

-DWITH_READLINE=1\ can pan-history commands

-DWITH_SSL=system\ Log in using certificate (security but affect transmission speed)

-DWITH_EMBEDDED_SERVER=1\ compile embedded server support

-DENABLED_LOCAL_INFILE=1\ supports import from native

-Library of how DWITH_INNOBASE_STORAGE_ENGINE=1 default engine data is stored

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

Servers

Wechat

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

12
Report