LMSouq

Knowledge Base

Browse Moodle Solutions

Clear

2110 solutions found in plugin-api

Page 46 of 106
0 votes
3 ans
22 views
ERROR 1396 (HY000): Operation CREATE USER failed for 'jack'@'localhost'

I seem to be unable to re-create a simple user I've deleted, even as root in MySQL. My case: user 'jack' existed before, but I deleted it from my...

general-dev Solved
RU
asked 5 months ago by Russ Bateman
0 votes
3 ans
29 views
Best way to test if a row exists in a MySQL table

I'm trying to find out if a row exists in a table. Using MySQL, is it better to do a query like this: SELECT COUNT(*) AS total FROM table1 WHERE ......

database Solved
BE
asked 5 months ago by Bernard Chen
0 votes
3 ans
30 views
Get table column names in MySQL?

Is there a way to grab the columns name of a table in MySQL using PHP?

database Solved
AN
asked 5 months ago by An employee
0 votes
1 ans
28 views
MySQL: Get character-set of database or table or column?

What is the (default) charset for: - MySQL database - MySQL table - MySQL column

database Solved
AM
asked 5 months ago by Amandasaurus
0 votes
3 ans
29 views
How do I see all foreign keys to a table or column?

In MySQL, how do I get a list of all foreign key constraints pointing to a particular table? a particular column? This is the same thing as [this Oracle questio...

database Solved
CH
asked 5 months ago by Christian Oudard
0 votes
3 ans
27 views
MySQL Query GROUP BY day / month / year

Is it possible to make a simple query to count how many records I have in a determined period of time like a year, month, or day, having a `TIMESTAMP` field, li...

database Solved
FE
asked 5 months ago by Fernando Barrocal
0 votes
1 ans
29 views
When to use single quotes, double quotes, and backticks in MySQL

I am trying to learn the best way to write queries. I also understand the importance of being consistent. Until now, I have randomly used single quotes, double...

database Solved
NA
asked 5 months ago by Nate
0 votes
3 ans
35 views
MySQL 8.0 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

I can't make a simple connection to the server for some reason. I install the newest MySQL Community 8.0 database along with Node.JS with default settings....

server-admin Solved
PI
asked 5 months ago by Pig
0 votes
1 ans
27 views
What is the best collation to use for MySQL with PHP?

Is there a collation type which is officially recommended by MySQL, for a general website where you aren't 100% sure of what will be entered? I understand t...

database Solved
DA
asked 5 months ago by Darryl Hein
0 votes
1 ans
24 views
SQL injection that gets around mysql_real_escape_string()

Is there an SQL injection possibility even when using `mysql_real_escape_string()` function? Consider this sample situation. SQL is constructed in PHP like t...

database Solved
RI
asked 5 months ago by Richard Knop
0 votes
3 ans
35 views
'IF' in 'SELECT' statement - choose output value based on column values

SELECT id, amount FROM report I need `amount` to be `amount` if `report.type='P'` and `-amount` if `report.type='N'`. How do I add this t...

general-dev Solved
MI
asked 5 months ago by Michael
0 votes
1 ans
26 views
Create new user in MySQL and give it full access to one database

I want to create a new user in MySQL and give it full access only to one database, say `dbTest` that I create with a command like `create database dbTest;`. Wha...

database Solved
JI
asked 5 months ago by jimgh
0 votes
3 ans
28 views
Find duplicate records in MySQL

I want to pull out duplicate records in a MySQL Database. This can be done with: SELECT address, count(id) as cnt FROM list GROUP BY address HAVING...

database Solved
CH
asked 5 months ago by Chris Bartow
0 votes
2 ans
26 views
MySQL: Grant **all** privileges on database

I've created database, for example 'mydb'. CREATE DATABASE mydb CHARACTER SET utf8 COLLATE utf8_bin; CREATE USER 'myuser'@'...

database Solved
MA
asked 5 months ago by marioosh
0 votes
3 ans
35 views
Authentication plugin 'caching_sha2_password' cannot be loaded

I am connecting MySQL - 8.0 with MySQL Workbench and getting the below error: > Authentication plugin 'caching_sha2_password' cannot be loaded: &...

general-dev Solved
AM
asked 5 months ago by Aman Aggarwal
0 votes
1 ans
26 views
How do I change the data type for a column in MySQL?

I want to change the data type of multiple columns from float to int. What is the simplest way to do this? There is no data to worry about, yet.

database Solved
ER
asked 5 months ago by Eric Wilson
0 votes
2 ans
29 views
MySQL - UPDATE query based on SELECT Query

I need to check (from the same table) if there is an association between two events based on date-time. One set of data will contain the ending date-time of...

database Solved
JO
asked 5 months ago by John M
0 votes
1 ans
28 views
How do I restore a dump file from mysqldump?

I was given a MySQL database file that I need to restore as a database on my Windows Server 2008 machine. I tried using MySQL Administrator, but I got the fo...

database Solved
ZA
asked 5 months ago by Zack Peterson
0 votes
2 ans
27 views
How to skip certain database tables with mysqldump?

Is there a way to restrict certain tables from the mysqldump command? For example, I'd use the following syntax to dump *only* `table1` and `table2`:...

database Solved
ZA
asked 5 months ago by Zac
0 votes
2 ans
32 views
Export schema without data

I'm using a MySql database with a Java program, now I want to give the program to somebody else. How to export the MySQL database structure without the d...

general-dev Solved
DA
asked 5 months ago by Darth Blue Ray