标签 MySQL 下的文章

1、连接Mysql 格式: mysql -h主机地址 -u用户名 -p用户密码 1、连接到本机上的MYSQL。 首先打开DOS窗口,然后进入目录mysql\bin,再键入命令mysql -u root -p,回车后提示你输密码.注意用户名前可以有空格也可以没有空格,但是密码前必须没有空格,否则让你重新输入密码。

Tags: MySQL

Read more

--查看用户连接 show processlist --查看MySQL本次启动后的运行时间(单位:秒) show status like 'uptime'; --查看select语句的执行数 show [global] status like 'com_select'; --查看insert语句的执行数 show [global] status like 'com_insert';

Tags: MySQL

Read more

编写sh文件 : /home/bkDatabase.sh: #!/bin/bash mysqldump -uusername -ppassword DatabaseName | gzip > /home/backup/DatabaseName_$(date +%Y%m%d_%H%M%S).sql.gz 添加权限: chmod u+x bkDatabase.sh 测试执行一下是否成功 ./bkDatabase.sh 系统添加定时任务

Tags: MySQL 定时备份 mysqldump

Read more

vi /etc/nginx/nginx.conf server { listen 80 default_server; listen [::]:80 default_server; server_name _; root /usr/share/nginx/html; //增加下面一行 index index.php index.html index.htm; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; location / { } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html {

Tags: centos MySQL PHP Nginx

Read more

1,安装第一次使用,使用 **mysql_secure_installation** 命令初始化 # mysql -uroot -p 2.1 更新 mysql 库中 user 表的字段: MariaDB [(none)]> use mysql; MariaDB [mysql]> UPDATE user SET password=password('newpassword') WHERE user='root'; 或者 MariaDB [mysql]> ALTER USER 'root'@'localhost' IDENTIFIED BY 'newpassword';

Tags: MySQL MariaDB root密码

Read more

V