mariadb

Spring boot error org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution

人走茶凉 提交于 2021-01-28 11:13:54
问题 Run the Jar package the spring boot application with data spring jpa and the mysql connector have different results in the Windows 10 environment and the linuxmint environment. If this application runs on linuxmint it works perfectly, but if it starts in Windows 10 an error like this occurs: ERROR org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa

DBUnit test gives NoSuchColumnException for MariaDB

馋奶兔 提交于 2021-01-28 10:33:18
问题 The important thing to notice that these tests work perfect on Ubuntu and on Server, but fail with the same error on Mac and Windows. So, in my test I use this configuration for connection to Maria db: @Configuration public class EmbeddedDatabase { @Autowired private String defaultSchema; @Bean public MariaDB4jService mariaDB4jService() { MariaDB4jSpringService mariaDB4jSpringService = new MariaDB4jSpringService(); DBConfigurationBuilder config = mariaDB4jSpringService.getConfiguration();

How to import parse csv file to Maria DB?

放肆的年华 提交于 2021-01-28 07:19:27
问题 I have a php code where I am parsing the csv file and I want to import the parse data to maria db. How can I do that? My code: <?php $row = 1; if (($handle = fopen("users.csv", "r")) !== FALSE) { while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $num = count($data); echo "<p> $num fields in line $row: <br /></p>\n"; $row++; for ($c=0; $c < $num; $c++) { echo $data[$c] . "<br />\n"; } } fclose($handle); } ?> Output: Task1 % php user_upload.php <p> 3 fields in line 1: <br /></p> name<br

MySQL MariaDB Server Raspberry Pi remote access

☆樱花仙子☆ 提交于 2021-01-28 05:14:20
问题 I have a working MySQL (MariaDB) Server running on my raspberry pi. It works fine when I want to connect to it from my local network. My specs are as followed: MariaDB [mysql]> SHOW VARIABLES LIKE "%version%"; +-----------------------------------+------------------------------------------+ | Variable_name | Value | +-----------------------------------+------------------------------------------+ | in_predicate_conversion_threshold | 1000 | | innodb_version | 10.3.22 | | protocol_version | 10 |

Laravel error in creating a table with two timestamp columns

耗尽温柔 提交于 2021-01-28 04:40:23
问题 I created a table in Laravel 6.6 with the following definition. public function up() { Schema::create('quarters', function (Blueprint $table) { $table->integer('quarter_id')->unsigned(); $table->integer('year')->unsigned(); $table->integer('quarter_num')->unsigned(); $table->timestamp('valid_from'); $table->timestamp('valid_to'); // <------ error on this line $table->string('description')->nullable(); $table->timestamps(); $table->primary('quarter_id'); }); } When I run the migration command

Improve performance of mysql LOAD DATA / mysqlimport?

不羁的心 提交于 2021-01-28 02:30:41
问题 I'm batching CSV 15GB (30mio rows) into a mysql-8 database. Problem: the task takes about 20min, with approxy throughput of 15-20 MB/s. While the harddrive is capable of transfering files with 150 MB/s. I have a RAM disk of 20GB, which holds my csv. Import as follows: mysqlimport --user="root" --password="pass" --local --use-threads=8 mytable /tmp/mydata.csv This uses LOAD DATA under the hood. My target table does not have any indexes, but approx 100 columns (I cannot change this). What is

「MySQL」- 安装(CentOS) @20210127

[亡魂溺海] 提交于 2021-01-27 22:38:27
本笔记将整理在 CentOS 中安装 MySQL 数据库的方法,以及可能会遇到的问题。 CentOS 7 and MySQL 5.7 How to install MySQL 5.6 on CentOS 7 How to Install MySQL on CentOS 7 How to Install MySQL 5.7 on Linux CentOS and Ubuntu 注意事项 1)建议参考官方文档以获取更多安装细节; 2)该安装过程不适用于 MariaDB 数据库; 第一步、添加官方仓库 # 添加官方仓库 yum install -y https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm # 检查源是否已经启用 yum repolist enabled | grep "mysql.*-community.*" # 更新本地缓存 yum makecache 第二步、安装数据库 # 查看所有可用版本 yum info --showdup mysql-community-server.x86_64 | grep -E 'Version\s+:' # 根据情况选择需要的版本 yum install -y mysql-community-server-5.7.28 yum install -y

#1111 - Invalid use of group function in mysql

我怕爱的太早我们不能终老 提交于 2021-01-27 20:56:16
问题 I have a table M_DAILY with fields PS_DATE date, tp int, ep int, mp int, and have a working version of a user defined function nvl(x,y) which returns x if not null and y if x is null My MySQL query is- select sum(avg(case date_format(PS_DATE,'%Y') when '2005' then nvl(tp,0) else 0 end))tp, sum(avg(case date_format(PS_DATE,'%Y') when '2005' then nvl(ep,0) else 0 end)) ep, sum(avg(case date_format(PS_DATE,'%Y') when '2005' then nvl(mp,0) else 0 end)) mp from M_DAILY where PS_DATE >= date ('2005

MARIADB - Error while sending QUERY packet (not max_allowed_packet)

独自空忆成欢 提交于 2021-01-27 14:30:52
问题 I'm having an issue with a PHP7 script saving data to a database (MariaDB). The script worked fine on a previous hosting package, but not on my new VPS. Warning: Error while sending QUERY packet. PID=1208 in ... Other threads caused me to look at settings, but my settings are: max_allowed_packet = 1GB wait_timeout = 10 I've reviewed the issue further and found there is nothing wrong with the query itself (it executes fine in phpMyAdmin). It seems to be something to do with executing two

第02章 MySQL的安装与配置

∥☆過路亽.° 提交于 2021-01-24 21:02:02
Windows下安装与配置MySQL5.7   在编辑此文章之时,mysql官方网站提供下载的MySQL5.7版本为 mysql-installer-community-5.7.22.1.msi   MySQL5.722 官方下载页面: 官方下载页面   MySQL5.722 官方下载地址: mysql-installer-community-5.7.22.1.msi   以防官网下载地址失效,下载后的安装文件上传到了百度网盘:     链接:https://pan.baidu.com/s/1aHUPNf4a0bUXkScwdhUTEw 密码:fgin 安装MySQL5.7   1. 双击下载的mysql-installer-community-5.7.22.1.msi文件        2. 打开【License Agreement】(用户许可证协议)窗口,选中【I accept the license terms】(我接受许可协议)复选框,单击【Next】(下一步)按钮。        3. 打开【Choosing a Setup Type】(安装类型选择)窗口,在其中列出了5种安装类型,分别是:     Developer Default:默认安装类型     Server only:仅作为服务器     Client only:仅作为客户端     Full:完全安装