xmake will automatically detect the system environment and create the most appropriate configuration to compile project when building a program
Usually we only need to run:
bash
$ xmake
And it will not re-generate configuration if the project description has not changed.
But we can also modify configuration manual继续阅读 »
创建用户并设置密码:
mysql
create user test IDENTIFIED BY '1234546';
为新用户分配权限:
mysql
//为该用户分配所有的权限
GRANT ALL PRIVILEGES ON *.* TO 'test'@'localhost' IDENTIFIED BY '123456';
//查看当前用户的权限
SHOW GRANTS;
//撤销上一次的授权
REVOKE ALL PRIVILEGES ON *.* FROM 'test'@'localhost'
/继续阅读 »
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick Start
Create a new post
bash
$ hexo new "My New Post"
More info: Writing
Run server
bash
$ hexo server
More in继续阅读 »
1.编码
1.查看数据库编码
show variables like 'char%';
修改编码格式:
mysql
set character_set_database = utf8;
set character_set_server = utf8;
more
2.查看建库语句
mysql
show create database your_database_name;
更改编码:
alter database `file` default character set utf8 collate utf8_general_ci;
在mysql中反引号 `` 用于用于用户自定义的量,而单引号'' 用于系统变量
3.修改继续阅读 »
**对代码不满足,是任何真正有天才的程序员的根本特征。**
Value '0000-00-00' can not be represented as java.sql.Timestamp
在查询MySql数据库某表的timestamp列的时候,发现此异常,问题来源表述如下
1. 先创建一个测试表
sql
create table test.mytest(
id int PRIMARY KEY AUTO_INCREMENT ,
createtime timestamp not null default current_timestamp , --创建时间
updatetime timestamp not null , --更新时继续阅读 »
数据库
sql
create database [IF NOT EXISTS]
USE
ALTER DATABASE [数据库名] {[DEFAULT] CHARACTER SET | [DEFAULT] COLLATE }
DROP DATABASE [IF EXISTS]
SHOW DATABASES [LIKE ]继续阅读 »
**对代码不满足,是任何真正有天才的程序员的根本特征。**
Value '0000-00-00' can not be represented as java.sql.Timestamp
在查询MySql数据库某表的timestamp列的时候,发现此异常,问题来源表述如下
1. 先创建一个测试表
sql
create table test.mytest(
id int PRIMARY KEY AUTO_INCREMENT ,
createtime timestamp not null default current_timestamp , --创建时间
updatetime timestamp not null , --更新时继续阅读 »