mysql


yum -y install mariadb-server mariadb

mysql> use mysql;
mysql> update user set password=PASSWORD("") where User='root';
mysql> flush privileges;

mysql> create database hululuu CHARACTER SET utf8 COLLATE utf8_unicode_ci;

sequel -m db mysql2://root@localhost/hululuu

mysqldump --no-create-info -uroot ecms table_name > sql/table_name.sql
mysql -uroot ecms < sql/table_name.sql


Table 'performance_schema.session_variables' doesn't exist

mysql> set @@global.show_compatibility_56=ON;



sequel pro


mysql命令行里查询显示中文

show variables like 'character%';
set character_set_results=gb2312;
#或者
set names gbk;


查表数量

SELECT COUNT(*) FROM information_schema.tables WHERE table_schema='hululuu'


gem i mysql2


windows上

#把c:\gem_build\mysql_5_5\bin;c:\gem_build\mysql_5_5\lib;加进PATH
gem i mysql2 -- --with-mysql-dir=E:/mysql-connector-c-6.1.3-win32



创建用户

create database db0 character set utf8;
create user 'q'@'localhost' identified by 'password';
grant all privileges on q.* to 'q'@'localhost';


备份

mysqldump --single-transaction -h 192.168.2.4 -u username -p app1_production > "C:\app1_production.sql"


还原

mysql -h 192.168.2.4 -u username -p app1_production < app1_production.sql
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值