服务器资料-Linux口令

 重启Nginx口令nginx -s reload

重启PHP口令:/etc/init.d/php-fpm restart
关闭3306数据库端口:
vi /etc/my.cnf 
在[mysqld]下添加:
skip-networking
重启mysql口令:service mysqld restart
登录mysql:mysql -uroot -p
只读权限:grant USAGE on tv2_inewya_com.* to 'tv2_inewya_com'@'localhost' identified by 'HOUxin123ggg' with grant option;
显示当前所有数据库:show databases;
添加数据库:CREATE DATABASE <表名>;
删除数据库:drop database <表名>;
添加用户名,并授权给数据库:grant all privileges on oneinstack.* to linuxeye@'localhost' identified by 'HOUxin123@@@';
// 使用DELETE删除用户yongfu_a,代码如下:
mysql> use mysql
Database changed
mysql> delete from user where user='yongfu_a' and host='localhost' ;
mysql>flush privileges ;
Query OK, 1 row affected (0.02 sec)
其中,delete用于删除用户,flush告诉服务器重新加载授权表
接着输入:flush privileges;//刷新系统权限表


开机启动挂载云盘:echo '/dev/vdb /www ext4 defaults 0 0' >> /etc/fstab

复制文件夹下的所有文件(网站备份):cp -R /home/usera/* /mnt/temp


发表评论

请大家文明评论,禁止一切不良言论,违者禁言处理。

后一页 前一页
快连VPN,永远能连上的VPN