Skip to content

Latest commit

 

History

History
52 lines (35 loc) · 1.13 KB

note-20160513.md

File metadata and controls

52 lines (35 loc) · 1.13 KB

备注

account

root/20160513 dev/dev20160513 mysql: root/mysqldb

centos7 mysql数据库改名为mariadb 启动,停止命令:

systemctl start mariadb systemctl stop mariadb systemctl restart mariadb systemctl enable mariadb

#mysql远程连接授权 grant all privileges on . to root@'%' identified by 'mysqldb'

centos7防火墙关闭与禁用

systemctl stop firewalld.service systemctl disable firewalld.service

yum -y install iptables-services

yum install groupinstall "GNOME Desktop" "Graphical Administration Tools"

查看表结构

desc 表名; show columns from 表名; describe 表名; show create table 表名; # 查看表创建语句

alter table '' change/modify 字段名称 字段类型

mysql的字符编码问题

注意各个级别的编码:数据库级别,表级别,字段级别

导出数据和表结构

mysqldump -uroot -p123 dbname > dbname.sql

只导出表结构

mysqldump -uroot -p123 -d dbname > dbname.sql

导入数据

source /home/abc/abc.sql

mysql -uname -p123 dbname < dbname.sql

GNOME切换工作区

ctrl+alt+方向上下键

文件同步工具 yum -y install lrzsz