LMSouq

Knowledge Base

Browse Moodle Solutions

Clear

422 solutions found in database

Page 18 of 22
0 votes
1 ans
3 views
How to declare a variable in MySQL?

How to declare a variable in mysql, so that my second query can use it? I would like to write something like: SET start = 1; SET finish = 10;...

database Solved
CD
asked 1 month ago by cdub
0 votes
1 ans
3 views
How can I solve "Error: MySQL shutdown unexpectedly"?

When I open XAMPP and click the start MySQL button, it gives me an error. I had started it just before, but now it isn't working. > 12:19:12 PM [mysq...

database Solved
AU
asked 1 month ago by Austin
0 votes
1 ans
3 views
Connection Java - MySQL : Public Key Retrieval is not allowed

I try to connect MySQL database with Java using connector 8.0.11. Everything seems to be OK, but I get this exception: Exception in thread "main&q...

database Solved
DA
asked 1 month ago by danny
0 votes
1 ans
3 views
MySQL DROP all tables, ignoring foreign keys

How do I drop all tables from a MySQL database, ignoring any foreign key constraints?

database Solved
BC
asked 1 month ago by bcmcfc
0 votes
1 ans
3 views
How to shrink/purge ibdata1 file in MySQL

I am using MySQL in localhost as a "query tool" for performing statistics in R, that is, everytime I run a R script, I create a new database (A), crea...

database Solved
LO
asked 1 month ago by lokheart
0 votes
1 ans
3 views
MySQL Error: : 'Access denied for user 'root'@'localhost'

Consider: ./mysqladmin -u root -p** '_redacted_' Output (including typing the password): > Enter password: > > mysqladmin: co...

database Solved
HA
asked 1 month ago by Harsh Trivedi
0 votes
1 ans
3 views
How to take backup of a single table in a MySQL database?

By default, `mysqldump` takes the backup of an entire database. I need to backup a single table in MySQL. Is it possible? How do I restore it?

database Solved
MA
asked 1 month ago by Mandar Pande
0 votes
1 ans
3 views
How should I resolve --secure-file-priv in MySQL?

I am learning MySQL and tried using a `LOAD DATA` clause. When I used it as below: ```mysql LOAD DATA INFILE "text.txt" INTO table mytable; ```...

database Solved
M0
asked 1 month ago by m0bi5
0 votes
1 ans
3 views
MySQL select 10 random rows from 600K rows fast

How can I best write a query that selects 10 rows randomly from a total of 600k?

database Solved
FR
asked 1 month ago by Francisc
0 votes
1 ans
3 views
How to show the last queries executed on MySQL?

Is there any query/way to show the last queries executed on **ALL** servers?

database Solved
FE
asked 1 month ago by FerranB
0 votes
1 ans
3 views
MySQL: @variable vs. variable. What's the difference?

In another question I posted someone told me that there is a difference between: ```sql @variable ``` and: ```sql variable ``` in MySQL. He also...

database Solved
AA
asked 1 month ago by aarona
0 votes
1 ans
3 views
MySQL Error 1153 - Got a packet bigger than 'max_allowed_packet' bytes

I'm importing a MySQL dump and getting the following error. $ mysql foo < foo.sql ERROR 1153 (08S01) at line 96: Got a packet bigger than &#...

database Solved
KC
asked 1 month ago by kch
0 votes
1 ans
3 views
Maximum length for MySQL type text

I'm creating a form for sending private messages and want to set the `maxlength` value of a textarea appropriate to the max length of a `text` field in my M...

database Solved
CY
asked 1 month ago by CyberJunkie
0 votes
1 ans
3 views
MySQL ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES)

I'm connected to my Amazon EC2 instance. I can login with MySQL root with this command: mysql -u root -p Then I created a new user bill with host...

database Solved
AL
asked 1 month ago by Ali
0 votes
1 ans
3 views
How to convert an entire MySQL database characterset and collation to UTF-8?

How can I convert entire MySQL database character-set to UTF-8 and collation to UTF-8?

database Solved
DE
asked 1 month ago by Dean
0 votes
1 ans
3 views
What is the difference between utf8mb4 and utf8 charsets in MySQL?

What is the difference between `utf8mb4` and `utf8` charsets in *MySQL*? I already know about *ASCII*, *UTF-8*, *UTF-16* and *UTF-32* encodings; but I&#39...

database Solved
MO
asked 1 month ago by Mojtaba Rezaeian
0 votes
1 ans
3 views
How do I modify a MySQL column to allow NULL?

MySQL 5.0.45 What is the syntax to alter a table to allow a column to be null, alternately what's wrong with this: ALTER mytable MODIFY mycolumn v...

database Solved
ZM
asked 1 month ago by zmf
0 votes
1 ans
3 views
MySQL error: key specification without a key length

I have a table with a primary key that is a varchar(255). Some cases have arisen where 255 characters isn't enough. I tried changing the field to a text, bu...

database Solved
GS
asked 1 month ago by GSto
0 votes
1 ans
3 views
Error installing mysql2: Failed to build gem native extension

I am having some problems when trying to install `mysql2` gem for Rails. When I try to install it by running `bundle install` or `gem install mysql2` it gives m...

database Solved
SP
asked 1 month ago by spacemonkey
0 votes
1 ans
3 views
How to delete a column from a table in MySQL

Given the table created using: CREATE TABLE tbl_Country ( CountryId INT NOT NULL AUTO_INCREMENT, IsDeleted bit, PRIMARY KEY (C...

database Solved
RA
asked 1 month ago by raji