mysql

Storing emojis in MySQL database

旧街凉风 提交于 2021-02-08 15:05:18
问题 I'm using Spring boot and I can't store emojis in database. I don't have access to my.cnf file. What I've done so far is: ALTER DATABASE name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; For each table: ALTER TABLE table CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; For each column: ALTER TABLE table CHANGE column column VARCHAR(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; In application.properties file I'm using this: spring.datasource.url = jdbc:mysql:/

Xampp mysql Error: MySQL shutdown unexpectedly

你离开我真会死。 提交于 2021-02-08 14:57:38
问题 when I starting mysql, giving the following error: 17:43:13 [mysql] Error: MySQL shutdown unexpectedly. 17:43:13 [mysql] This may be due to a blocked port, missing dependencies, 17:43:13 [mysql] improper privileges, a crash, or a shutdown by another method. 17:43:13 [mysql] Press the Logs button to view error logs and check 17:43:13 [mysql] the Windows Event Viewer for more clues 17:43:13 [mysql] If you need more help, copy and post this 17:43:13 [mysql] entire log window on the forums then,

Angular Error - ReferenceError: $modal is not defined

允我心安 提交于 2021-02-08 14:57:14
问题 I am using code form a tutorial and modifying it a bit. I have run into an issue with the edit feature. I keep getting a "ReferenceError: $modal is not defined" here is my code. postCtrl: app.filter('startFrom', function() { return function(input, start) { if(input) { start = +start; //parse to int return input.slice(start); } return []; } }); app.filter('dateToISO', function() { return function(input) { input = new Date(input).toISOString(); return input; }; }); app.controller('postsCtrl',

MySql:Windows10安装mysql-8.0.18-winx64步骤

假装没事ソ 提交于 2021-02-08 14:31:14
步骤: 1、 首先在安装的mysql目录下创建my.ini文件 (深坑)注意:my.ini必须保存为ANSI格式!!! 可以先创建一个my.txt的文件,然后另存为ANSI格式的文件! my.ini内容如下: [ client ] port = 3306 default - character - set = utf8mb4 [ mysqld ] #修改成你自己的mysql路径 basedir = C:\\Software - D\\MySQL\\mysql - 8.0 . 18 - winx64 port = 3306 #服务端使用的字符集默认为8比特编码的latin1字符集 character - set - server = utf8mb4 #创建新表时将使用的默认存储引擎 default - storage - engine = INNODB [ mysql ] default - character - set = utf8mb4 2、打我的电脑C:\Windows\System32\cmd.exe,右击cmd选择以管理员身份运行 3、在dos命令窗口执行cd e:\workspace\mysql-5.6.24-win32\lib 转到bin目录下 执行删除命令 mysqld - remove 执行安装命令 mysql - install 执行初始化命令 mysqld -

MySQL安装详解

你说的曾经没有我的故事 提交于 2021-02-08 13:34:52
MySQL是一个轻量级的关系型数据库,一般自己在家里学习关系型数据库的话,安装MySQL就可以了,下面是一个详细的安装MySQL的过程。【这个笔记具体我也忘了是从哪里找到的了,很详细,就分享给大家,大神勿笑】 检查安装是否成功 登录MySQL:mysql -uroot -p123 退出MySQL:exit | quit 查看数据库:show databases; 来源: oschina 链接: https://my.oschina.net/u/4350176/blog/4105392

来谈谈写作这件事

痴心易碎 提交于 2021-02-08 13:18:41
写作这件事,很多大佬都谈过,但我还是想从自己的角度去谈谈. 说到写作,我们就需要来说,我为什么要去写作,或者说,写作带给了我什么. 1 ,可以系统性的思考. 我觉得你肯定有这样的感受,就是一个知识点我明明懂了,可是给别人讲的时候,却总是讲不明白.知道为什么嘛?因为你只是以为你自己懂了,实际上你并没有懂. 而写作就相当于你在给别人讲,那么你为了写明白一个知识点,为了让别人读懂你这篇文章,你会怎么做? 就拿这篇文章来说,为了向别人说明写作的重要性,你会怎么展开?起码会从是什么,为什么,怎么做,这三点去展开说,对吧. 那么,当你这样去写的时候,你发现,我好像对是什么不太清楚,所以你就会去查资料;我为什么要去用这个呢,想不明白,再去查资料;我怎么用这个知识呢,再去查资料或者实践. 这样做一次两次三次...当你坚持这样写完 100 篇文章的时候,你的思考角度,思维模式,绝对和写作之前不一样. 2 ,构建影响力. 对于一个人来说,最重要的是什么?是有自己的「影响力」. 当你有自己的影响力时,你就能够在整个行业里面脱颖而出,从而能够有机会结识更加优秀的人. 但是影响力很轻松就能构建?只想说,别做梦了. 那么,我怎么构建影响力? 高质量的内容 一件事情,你一定要想清楚,就是你和我都互相不认识,那么我凭什么信任你,我凭什么受你的影响,对吧.靠的就是高质量的内容. 我写博客,特别是需要实操的内容

select all records created within the hour

☆樱花仙子☆ 提交于 2021-02-08 13:14:35
问题 startTimestamp < date_sub(curdate(), interval 1 hour) Will the (sub)query above return all records created within the hour? If not will someone please show me a correct one? The complete query may look as follows: select * from table where startTimestamp < date_sub(curdate(), interval 1 hour); 回答1: Rather than CURDATE() , use NOW() and use >= rather than < since you want timestamps to be greater than the timestamp from one hour ago. CURDATE() returns only the date portion, where NOW() returns

select all records created within the hour

泪湿孤枕 提交于 2021-02-08 13:14:02
问题 startTimestamp < date_sub(curdate(), interval 1 hour) Will the (sub)query above return all records created within the hour? If not will someone please show me a correct one? The complete query may look as follows: select * from table where startTimestamp < date_sub(curdate(), interval 1 hour); 回答1: Rather than CURDATE() , use NOW() and use >= rather than < since you want timestamps to be greater than the timestamp from one hour ago. CURDATE() returns only the date portion, where NOW() returns

How to stop a running procedure in MySQL?

依然范特西╮ 提交于 2021-02-08 13:11:36
问题 I called a procedure in MySQL, but it is in an endless loop now! How to stop a running procedure in MySQL? The following is my procedure code: drop procedure if exists my_proc; DELIMITER $$ CREATE PROCEDURE my_proc () BEGIN DECLARE VAR INT; SET VAR=0; WHILE VAR<10000 DO INSERT INTO my_table () VALUES (); END WHILE; END; $$ DELIMITER; CALL my_proc(); 回答1: Connect to the server (or use phpmyadmin or something similar) and do: SHOW PROCESSLIST; Find the process causing trouble, note its ID and

How to stop a running procedure in MySQL?

五迷三道 提交于 2021-02-08 13:11:16
问题 I called a procedure in MySQL, but it is in an endless loop now! How to stop a running procedure in MySQL? The following is my procedure code: drop procedure if exists my_proc; DELIMITER $$ CREATE PROCEDURE my_proc () BEGIN DECLARE VAR INT; SET VAR=0; WHILE VAR<10000 DO INSERT INTO my_table () VALUES (); END WHILE; END; $$ DELIMITER; CALL my_proc(); 回答1: Connect to the server (or use phpmyadmin or something similar) and do: SHOW PROCESSLIST; Find the process causing trouble, note its ID and