立即學習:https://edu.csdn.net/course/play/8578/176535?utm_source=blogtoedu
apt update
apt install -y mysql-server mysql-client
service mysql stop
service mysql start
service msyql restart
vi /etc/mysql/my.cnf
[mysqld]
basedir =/usr/ 程度地址
datadir =/var/lib/mysql 數據地址
port =3306
bind-address =127.0.0.1 綁定地址
max_connections 最大連接數
slow_query_log =1
slow_query_log_file =slow.log
long_query_time =2 執行超過2s
innodb_buffer_pool_size = 3G 單純的mysql服務器 要內存70%左右
innodb myisam
show variables like 'innodb_buffer_pool_size';
show status like 'innodb_rows_%';