Category "mysql"

SSMA Column "column" does not allow DBNull. Value

I'm right now trying to migrate a Mysql db to Sql Server, I found in some forums that they recommend to use SSMA (SQL Sever Migration Assistant) but when I try

Golang MySQL error - packets.go:33: unexpected EOF

I am switching my entire code base from PHP to Go and during several processes that run, I randomly get this error: [mysql] 2016/10/11 09:17:16 packets.go:33:

SQL "with" clause - Error Code: 1046. No database selected Select the default DB to be used by double-clicking its name in the SCHEMAS

I have the following query which works fine: select a.dataId, a.my_no, b.my_attribute from myDB.table_a a left join myDB.table_b b on a.my_no = b.my_no orde

mysql - avoid escaping double quotes in json functions

When I issue... select JSON_REPLACE('{"tbl" : "cnf"}', '$', '{"tbl":"cnf4"}'); I get the following : +------------------------------------------------------

Yii2 add LIKE condition with "%" wildcard on the one side

I want to add like condition with % wildcard on the one side, like: where name like 'value%' My code: Table::find()->filterWhere(['like', 'name' , $_GET[

Json_Encode not returning html even i try to encode JSON_HEX_QUOT | JSON_HEX_TAG

I want to return HTML from PHP. I found a solution from StackOverflow which is insert JSON_HEX_QUOT | JSON_HEX_TAG after array in json_encode but it does not wo

What are MySQL InnoDB intention locks used for?

I have read the MySQL mannual about intention lock: http://dev.mysql.com/doc/refman/5.5/en/innodb-locking.html#innodb-intention-locks It says that "To m

mysqld folder in /var/run/ keeps deleting and re-creating itself

I couldnt start mysql on my ubuntu server and got the error message ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysq

Homebrew - brew mysql 8 - Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

I tried a lot to install MySQL8 via Homebrew on Mac 10.14.5. I was running MySQL 5.7 before that and did the following: I removed MySQL completely via this tuto

write a query to this..?

Students and Grades. Students contains three columns ID, Name and Marks, Grades-(grade,min_mark,max_mark) Ketty gives Eve a task to generate a report containin

Save lat & lng values into point field in mysql

I have a table with fields latitude and longitude stored as float values, and I want to start saving them into points in a new column to use spatial features. C

Group by age ranges in MySQL

We have a date of birth field(type date) and user_id in the table and we want to get count of users group by age based on the date of birth field For e.g. afte

want to get country area code from phone number present in mysql db

I'm having phone number 1212010089 and want to know from which country I'm getting this number.I do have a table_1 which is having column1 area_codewhere lots o

Does the Laravel `increment()` lock the row?

Does calling the Laravel increment() on an Eloquent model lock the row? For example: $userPoints = UsersPoints::where('user_id','=',\Auth::id())->first();

Group by age ranges in MySQL

We have a date of birth field(type date) and user_id in the table and we want to get count of users group by age based on the date of birth field For e.g. afte

How to process a string as a file to contruct a ZipFile object?

I am currently pulling data from a database with blobs. I retrieve the blob from the database, but I need to parse the text. the ZipFile class takes in files no

How to find next AUTO_INCREMENT value of a table in MYSQL 8

I was using the query below to find the next AUTO_INCREMENT value of table in MYSQL 5.7 SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME

How to reduce Google Cloud SQL instance size?

I have a Google Cloud SQL MySQL 2nd Gen 5.7 instance with 70GB of unused storage. I want to reduce the unused storage of my instance as this is one of the major

Upgrade MySQL on Mac

I did an upgrade of my XAMPP from 7.1.24 to 7.4.2. First I uninstall my XAMPP using uninstall.app, then I install my new XAMPP, then i check my phpmyadmin every

Why select id using other index?

I am using mysql8.0.27, here is my table: CREATE TABLE `test` ( `id` int NOT NULL, `number` int DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `idx_number