Questions tagged [mysql]
MySQL is a free, open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). DO NOT USE this tag for other DBs such as SQL Server, SQLite etc. Those are different DBs which all use their own dialects of SQL to manage the data.
644,274
questions
0votes
0answers
5views
Connect Mysql Workbench (Windows HOST) to WSL mysql server
I just installed the Mysql workbench program on my windows host and I want to connect to my MySQL server on my WSL2, but I've tried multiple methods such as:
Writing in the connection the IP from my ...
0votes
0answers
9views
How to import CSV with some empty cells into MySQL? [duplicate]
I am trying to import a CSV with some empty cells into MySQL database. How can I just import the database and let the value be "NULL" or something like that if there is no data in that cell?....
-5votes
0answers
13views
PHP - Echoing variable name returns correct value, but using variable in query as tablename throws error [closed]
I am stumped by a problem that has been bugging me for a few days now and cannot seem to find solution for it.
In my application's back-end, I use a MySQL query in PHP to get table-name, stored in ...
-1votes
0answers
11views
Understanding TVL or 3VL logic in SQL
Today I was studying sql and I stumbled upon the Three-Valued Logic and I'm having a hard time to understand the TVL AND and TVL OR table.
Here is the TVL AND table
AND
True
False
Unknown
True
True
...
0votes
2answers
15views
How to create a Many-to-Many Relationship with unique column of a specific value using MySQL
I want to create a User which has multiple Items but only one item of a specific type. The tables will look something like this.
1st table: item
id
type
name
1
first
name1
2
first
name2
3
normal
...
0votes
0answers
12views
How to increment the HTML <th> and <tr> tag in php loop
I want to display data in HTML Table format as shown in screen shot below.
Every report has many different time. For each time mysql table has different student details. The time are supposed to be ...
1vote
1answer
20views
using map function and getting this error companies1.map is not a function React JS
I am trying to fetch data from MySQL database and I am using the map function
const [companies, setCompanies] = useState([]);
useEffect(() => {
getCompany();
}, []);
const getCompany = async ()...
0votes
0answers
11views
Does select_for_update() work if AUTOCOMMIT is set to False in Django Rest-Framework
I am writing a celery task which would get invoked if a row is being inserted into a table. This task is being executed in a transaction and the task also locks the certain rows of several tables.
Now ...
-6votes
0answers
19views
How do i decrypt this please DC96D644E0CE2A54A6BDF0DCEB0C9DB034ED826E [closed]
the web developer that designed my company website no longer works with my company, but i did some research and none of the decryption methods i saw worked for me.i want to decrypt the rest also
...
0votes
2answers
21views
compare description of the same name in mysql
I have one table with 3 columns like this table below
name
stat
genstat
a
Pending
(NULL)
a
Received
(NULL)
b
Pending
(NULL)
c
Received
(NULL)
a
Received
(NULL)
b
Pending
(NULL)
c
Received
(...
-3votes
0answers
17views
I'm trying to update the data from form into the database using php pdo but I'm getting the following error [duplicate]
Following is the code for updating. This is the code of update file
<?php
$id = $_GET['id'];
if(!isset($id)){
header("Location ./index.php");
}
require_once('./db....
-1votes
0answers
17views
How to get final result by combining two query results in Laravel?
I want to get income and expense results every day.
Table name : sales_records
id
product_id
qty
selling_price
sale_date
branch
1
1
2
1000
2022-03-25
1
2
1
1
1000
2022-03-25
2
3
1
2
1000
2022-03-...
0votes
0answers
6views
Error establishing a database connection - Docker Wordpress & mysql setup
I am trying to set up a wordpress docker container on a raspberry pi zero.
whey I browse IPv4 address of my raspberry pi zero i get following on the browser
Error establishing a database connection
...
0votes
0answers
15views
I want to delete session from database when user left the page or website
I want to delete session from database which are stored in db as ci_session table and now I need to delete these when user left the page or website
$config['sess_driver'] = 'database';
$config['...
0votes
0answers
18views
Not able to insert csv data into mysql table
I have one csv file that have so many fields but interested in only 5. We picked them up using pandas and now want to insert into mysql table.
This is the logic for same.
Table strucure:
...
0votes
0answers
9views
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from `users` where `email` = datbui27497@gmail.com limit 1)
i have problem when i try to use database on xampp
i really think the problem from i use docker to my company and xampp for study so when i'm done docker and i just docker-composer down then i turn on ...
-1votes
0answers
18views
COALESCE () not working as ISNULL() in Postgres
I'm trying to do the following in Postgres
Update a
SET PropertyAddress = ISNULL(a.PropertyAddress,b.PropertyAddress)
From PortfolioProject.dbo.NashvilleHousing a
JOIN PortfolioProject.dbo....
0votes
0answers
9views
NDB Cluset MySQL - How it performs join queries?
I have been reading about MySQL scaling and I found out that MySQL supports two type of architectures :
Master - Slave - Since updates from master to slave are asychronous then it is possible to have ...
0votes
0answers
7views
Why Cant we use Solr alone?
In our application, we using both mysql and solr as well (ie., inserting data in mysql and when solr gets started, it reads data from mysql).
Couple of queries:
Why cant we just use Solr alone? (...
-1votes
1answer
24views
UPDATE from SELECT but still return selected data in MySQL
I have read a bunch of ways that has gotten me this far. But I can't get to the finish line.
I have a table of coupon codes. I want to use one transaction to select the next available code, mark it ...
0votes
0answers
7views
Create table columns in MySQL workbench from CSV
I've searched Overflow and haven't found this answer.
I have a CSV file with 300+ columns.
I would like to upload this into MySQL workbench.
I do not want to create a table and manually enter the ...
0votes
0answers
17views
mySQL query to insert the last incremented id from two tables into one
I am trying to figure out how to get the last incremented id from two different tables and insert those values into a third table. I have a working query for when it was only one table, utilizing ...
0votes
0answers
18views
Can I import a mysql 5.4 dump file into mysql 8.0
I have an old backup (mysqldump) file from mysql 5.6. Can I import it in MySql 8.0? What precautions should I take?
I was searching mysql document but could not find any reference instead come to know ...
-2votes
0answers
10views
User has insufficient authorization for connection while using datastudio(Google)
We have our dashboard by using google datastudio.
One of our team member refreshed some dataset and found out this error message below.
No Data Access Authorization.
User has insufficient ...
0votes
0answers
5views
Can't get my values/data to insert into second MySQL db even though now errors show
The issue: My first table bugtracker_table on dashboard.js works fine when I submit data to it but my second table ticket_table on projects.js do not submit values even though it's pretty much the ...
0votes
0answers
10views
Load TPC-DS data to Apache Cassandra using Trino
I use Trino connectors for TPCDS, MongoDB, Cassandra and HBase (Phoenix connector). I want to test the system with TPCDS benchmarks.
For this reason I am trying to load TPCDS data to each database ...
-3votes
0answers
26views
How can I sort a column based on values of another column? [closed]
I'm the following table
id
Column B
referenceToId
1
text 1
0
2
text 2
0
3
text 3
2
4
text 4
1
5
text 5
2
And I want the records ordered by ReferencedToId, to get output like so:
(id=1) text1
(...
-2votes
1answer
26views
php 5.4 vs 7.6 - mysqli doesn't load rows [duplicate]
I've been having an issue migrating from php 5.6 to 7.4.
I am using an old calendar script which I am trying to convert in order to be functional on the new version of PHP.
However when I change the ...
0votes
2answers
26views
uploading two files from two fields with multer as middleware
i'm trying to upload two files with different file extensions with multer from two fields but when i try it with postman the result always for the file is null, what is the solution for my problem? ...
0votes
0answers
26views
Connection must be valid and open VB.NET and i open and close all the necessary connection already (SOLVED)
I have checked my code repeatedly but I still haven't found any logical error in my codes. It says connection must be valid and open but I have already open the connection and close it when I don't ...
-1votes
0answers
15views
Prompt to enter password or wrong email and password format not working (php)
I've been following along with this video https://www.udemy.com/course/create-a-high-end-social-network-like-twitter-in-php-mysql/learn/lecture/7419006#overview to be able to learn the process it ...
0votes
0answers
13views
MySQLDump stops after 664 of 741 tables - only structure
I have a PHP-script to dump the "structure only" of a database with a total of 741 tables.
Im calling "shell_exec" which works fine.
The reason is, sadly... I do not have any shell-...
0votes
0answers
12views
access mariadb in raspberry pi in home network
I have mariadb set up in my raspberry pi and would like to connect to the databases hosted on that pi.
But when I put in this command:
mysql -u vaultadmin -h 192.168.0.193 -p -D vault
I am getting ...
0votes
1answer
16views
My update code updates more than one field?
Strange one this, I have a database set up with these fields:
EmailConfirmID
EmailToConfirm
ConfirmCode
DateRequested
DandTConfirmed
When I run this bit ...
-2votes
1answer
17views
Variables in select query gives wrong value
I have 2 example tables like this :
When i try this query :
select @KOLI := count(barang_transaksi.sml) as 'KOLI',
@BERAT := sum(barang_transaksi.berat) as 'BERAT',
transaksi.harga as '...
-2votes
0answers
11views
Pivot table conditions are bad practice?
I have a pivot table for a many to many group of records.
Consider the following structure
A has many B
B has many A
A has many C
C has many A
if A has multiple B in this table and I want to pull only ...
0votes
0answers
17views
Wix <-> MySQL connection options
I'm trying to figure out how to connect a Wix form to a GCP MySQL instance without a connector such as https://apix-drive.com/en/wix-com/mysql. Is it possible? I have successfully created a ...
-1votes
1answer
21views
Is there a way in SQL to create a new column that looks at the values in a column that shares multiple rows to determine the value in the new column?
My data looks similar to what I've attached.
I'm wanting to create a new column that looks at the appt# and any row associated with that appt to see if that appt had the procedure D0330 and marks it ...
0votes
1answer
38views
get users which are connected together
If I'm logged in as a teacher, I would like to get the student and the parents. If I'm logged in as a parent I would like to get the student and the teachers. Lastly, if I'm logged in as a student, I ...
0votes
0answers
20views
Database not showing up in Webpage
I'm trying to get a database to show up in a table according to an assignment(this is a college course). I have followed the instructions to the letter but I can't get the table to show up on the ...
0votes
0answers
6views
Offset pagination in MySQL return inconsistent results using ORDER BY Date
I have recently found that my pagination queries in MySQL are somehow broken and, after some research, I tend to believe it comes from the fact that I paginate my rows by a DATETIME field. My issue is ...
0votes
0answers
13views
How to write unit tests in python application without affecting database?
I'm trying to create a unit testing framework for an existing python application. Most of functions have database dml transactions. How do i unit test those functions without actually affecting the ...
0votes
0answers
23views
Versions of MySQL prior to 5.6 are not currently supported
Recently my web host decided to switch to MariaDB from MySQL. Since then, I get the following error whenever a page tries to connect to the database. "Versions of MySQL prior to 5.6 are not ...
-1votes
0answers
18views
How do I dynamically pull a table value to insert as another table value? (Nodejs, sql, inquirer)
This is my first question on here, and I hope someone can help. I'm trying to create a CLI database in which a company might track employees by department and role using Nodejs, Mysql, and inquirer. I ...
1vote
1answer
36views
How to pass tuple with one element as param in sql query Python?
How can I pass tuple with only one element as param in sql query Python?
I have tried this solution suggested here:
imploding a list for use in a python MySQLDB IN clause
ids = [(UUID('1232a4df-5849-...
0votes
1answer
11views
I forgot the root password to login to MySQL , and am unable to login into mysql through terminal. Please help to me to solve the issue? [duplicate]
sudo mysqld_safe --skip-grant-tables;
mysql -u root
I have tested the above code, but was unable to enter the mysql.
still in the (base)~
-1votes
2answers
22views
Are views in MySQL quicker than complex queries? [duplicate]
I have a problem with a SELECT with multiple inner joins. My code is as follows:
SELECT `movies02`.`id`, `movies02`.`title`,
`movies03`.`talent`,
`movies07`.`character`,
`...
-3votes
0answers
15views
The "create Data base " in java DB in net beans is pale [closed]
? The "create Data base " option in "java DB" in "net beans ide " is pale and it is inactive. ,how can I solve it.
0votes
0answers
17views
PHPmyAdmin, enable SSL in local net
I have a PHP application on Apache 2.4 server with installed mySql server and PHPmyAdmin.
To do some tests for educational purposes I need to enable SSL / TLS both on the PHP WEB application and on ...
-1votes
0answers
29views
How do I organize table in mySql the way question asked? [closed]
So the question goes like this:
List the students and the number of courses they have enrolled in from the enrollments table.
The enrollments table is shown in image.
This is what I tried. I think ...