Snippets Collections
function change_maintenance_date() {
  //Change the date so the Report date is 2024. 07. 15.
  $cfp = \Drupal::entityTypeManager()->getStorage('cfp')->load(190);
  $cfp->set('maintenance_period', '2021-07-15')->save(); // Ovaj datum je 
}
SELECT entity_id, COUNT(variations_target_id)
FROM `commerce_product__variations`
GROUP BY entity_id
HAVING COUNT(variations_target_id) > 1;
SELECT gender, day, sum(score_points) over (partition by gender order by day) as total FROM Scores 
ORDER BY gender, day
/* AQUI CREARE LA TABLA */
CREATE DATABASE fejesus;

CREATE TABLE leccion (
    id_leccion INT NOT NULL AUTO_INCREMENT, 
    titulo VARCHAR(30),
    instructor VARCHAR(50),
    no_leccion INT,

    PRIMARY KEY(id_leccion),
    INDEX(no_leccion)
    
) ENGINE=INNODB;

DESCRIBE leccion;

CREATE TABLE preguntas (
    id_pregunta INT NOT NULL AUTO_INCREMENT,
    pregunta VARCHAR(200),
    verso VARCHAR(40),
    id_leccion INT NOT NULL,
    id_seccion INT NOT NULL,

    PRIMARY KEY (id_pregunta),
    INDEX(id_leccion),
    INDEX(id_seccion),

    FOREIGN KEY (id_leccion)
        REFERENCES leccion(id_leccion)
        ON UPDATE CASCADE ON DELETE RESTRICT
    
) ENGINE=INNODB;

DESCRIBE preguntas;

CREATE TABLE seccion ( 
    id_seccion INT NOT NULL AUTO_INCREMENT, 
    leccion_id INT NOT NULL, 
    titulo VARCHAR(100), 

    PRIMARY KEY(id_seccion), 
    INDEX (leccion_id), 
        
    FOREIGN KEY (leccion_id) 
        REFERENCES leccion(id_leccion) ON UPDATE CASCADE ON DELETE RESTRICT

) ENGINE=INNODB;

DESCRIBE seccion;
select id from workflowexecution where subject like '%FOZG-069338%';

update workflowexecution set state = 4, cancellationDate=CURRENT_TIMESTAMP where id = 34470;

update workflowdefinitionexecution set state = 4 , cancellationDate=CURRENT_TIMESTAMP where workflowexecution_id = (select id from workflowexecution where id = 34470);

update workflowstepexecution set state = 4 where workflowdefinitionexecution_id in (select id from workflowdefinitionexecution where workflowexecution_id = (select id from workflowexecution where id = 34470));
$data = array(
  	'nazov' => $name,
  	'poznamka' => $poznamka,
  	'user_id' => $user_id,            
  	'date_modify' => date('Y-m-d H:i:s')
);

$this->db->where('ponuka_id',$ponuka_id);
$this->db->update('tsv_ponuky_h',$data);
$select = "SELECT * FROM tsv_sablonah WHERE sablona_id = '".(int)$sablona."'";
        
if($this->db->query($select)->num_rows() > 0 ){
  	return $this->db->query($select)->row();
} else {
  	return '';
}
$data = array(
  'nazov' => $name,
  'poznamka' => $poznamka,
  'user_id' => $user_id,
  'date_added' => date('Y-m-d H:i:s')
);
$this->db->insert('tsv_ponuky_h',$data);

$new_id = $this->db->insert_id();
CREATE TABLE drivers (
 emp_id INT PRIMARY KEY,
  first_name VARCHAR(40),
  last_name VARCHAR(40),
  Age INT,
  sex VARCHAR(1),
  Salary  INT,
  boss_id INT,
  team_id INT
);


CREATE TABLE employee (
  emp_id INT PRIMARY KEY,
  first_name VARCHAR(40),
  last_name VARCHAR(40),
  birth_day DATE,
  sex VARCHAR(1),
  salary INT,
  super_id INT,
  branch_id INT
);

CREATE TABLE team (
  team_id INT PRIMARY KEY,
  team_name VARCHAR(40),
  boss_id INT,
  boss_name VARCHAR(20),
  FOREIGN KEY(boss_id) REFERENCES drivers(driver_id) ON DELETE SET NULL
);


CREATE TABLE team (
  team_id INT PRIMARY KEY,
  team_name VARCHAR(40),
  boss_id INT,
  boss_name VARCHAR(20),
  FOREIGN KEY(boss_id) REFERENCES drivers(driver_id) ON DELETE SET NULL
);








ALTER TABLE drivers33
ADD FOREIGN KEY(team_id)
REFERENCES team(team_id)
ON DELETE SET NULL;

ALTER TABLE drivers33
ADD FOREIGN KEY(boss_id)
REFERENCES drivers(emp_id)
ON DELETE SET NULL;














CREATE TABLE client (
  client_id INT PRIMARY KEY,
  client_name VARCHAR(40),
  branch_id INT,
  FOREIGN KEY(branch_id) REFERENCES branch(branch_id) ON DELETE SET NULL
);

CREATE TABLE works_with (
  emp_id INT,
  client_id INT,
  total_sales INT,
  PRIMARY KEY(emp_id, client_id),
  FOREIGN KEY(emp_id) REFERENCES employee(emp_id) ON DELETE CASCADE,
  FOREIGN KEY(client_id) REFERENCES client(client_id) ON DELETE CASCADE
);

CREATE TABLE branch_supplier (
  branch_id INT,
  supplier_name VARCHAR(40),
  supply_type VARCHAR(40),
  PRIMARY KEY(branch_id, supplier_name),
  FOREIGN KEY(branch_id) REFERENCES branch(branch_id) ON DELETE CASCADE
);


-- -----------------------------------------------------------------------------

-- Corporate
INSERT INTO employee VALUES(100, 'David', 'Wallace', '1967-11-17', 'M', 250000, NULL, NULL);

INSERT INTO branch VALUES(1, 'Corporate', 100, '2006-02-09');

UPDATE employee
SET branch_id = 1
WHERE emp_id = 100;

INSERT INTO employee VALUES(101, 'Jan', 'Levinson', '1961-05-11', 'F', 110000, 100, 1);

-- Scranton
INSERT INTO employee VALUES(102, 'Michael', 'Scott', '1964-03-15', 'M', 75000, 100, NULL);

INSERT INTO branch VALUES(2, 'Scranton', 102, '1992-04-06');

UPDATE employee
SET branch_id = 2
WHERE emp_id = 102;

INSERT INTO employee VALUES(103, 'Angela', 'Martin', '1971-06-25', 'F', 63000, 102, 2);
INSERT INTO employee VALUES(104, 'Kelly', 'Kapoor', '1980-02-05', 'F', 55000, 102, 2);
INSERT INTO employee VALUES(105, 'Stanley', 'Hudson', '1958-02-19', 'M', 69000, 102, 2);

-- Stamford
INSERT INTO employee VALUES(106, 'Josh', 'Porter', '1969-09-05', 'M', 78000, 100, NULL);

INSERT INTO branch VALUES(3, 'Stamford', 106, '1998-02-13');

UPDATE employee
SET branch_id = 3
WHERE emp_id = 106;

INSERT INTO employee VALUES(107, 'Andy', 'Bernard', '1973-07-22', 'M', 65000, 106, 3);
INSERT INTO employee VALUES(108, 'Jim', 'Halpert', '1978-10-01', 'M', 71000, 106, 3);


-- BRANCH SUPPLIER
INSERT INTO branch_supplier VALUES(2, 'Hammer Mill', 'Paper');
INSERT INTO branch_supplier VALUES(2, 'Uni-ball', 'Writing Utensils');
INSERT INTO branch_supplier VALUES(3, 'Patriot Paper', 'Paper');
INSERT INTO branch_supplier VALUES(2, 'J.T. Forms & Labels', 'Custom Forms');
INSERT INTO branch_supplier VALUES(3, 'Uni-ball', 'Writing Utensils');
INSERT INTO branch_supplier VALUES(3, 'Hammer Mill', 'Paper');
INSERT INTO branch_supplier VALUES(3, 'Stamford Lables', 'Custom Forms');

-- CLIENT
INSERT INTO client VALUES(400, 'Dunmore Highschool', 2);
INSERT INTO client VALUES(401, 'Lackawana Country', 2);
INSERT INTO client VALUES(402, 'FedEx', 3);
INSERT INTO client VALUES(403, 'John Daly Law, LLC', 3);
INSERT INTO client VALUES(404, 'Scranton Whitepages', 2);
INSERT INTO client VALUES(405, 'Times Newspaper', 3);
INSERT INTO client VALUES(406, 'FedEx', 2);

-- WORKS_WITH
INSERT INTO works_with VALUES(105, 400, 55000);
INSERT INTO works_with VALUES(102, 401, 267000);
INSERT INTO works_with VALUES(108, 402, 22500);
INSERT INTO works_with VALUES(107, 403, 5000);
INSERT INTO works_with VALUES(108, 403, 12000);
INSERT INTO works_with VALUES(105, 404, 33000);
INSERT INTO works_with VALUES(107, 405, 26000);
INSERT INTO works_with VALUES(102, 406, 15000);
INSERT INTO works_with VALUES(105, 406, 130000);
SELECT table_name ,
  round(((data_length + index_length) / 1024 / 1024), 2) as SIZE_MB
FROM information_schema.TABLES
WHERE table_schema = DATABASE() ORDER BY SIZE_MB DESC;
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
mysqldump -u root -p -h host_name_or_ip -P port_number --databases db_name --tables tbl_1 tbl_2 > db_name.sql
CREATE DATABASE mydatabase CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
UPDATE wp_options SET option_value = replace(option_value, 'oldurl.com', 'newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'oldurl.com','newurl.com');
UPDATE wp_posts SET post_content = replace(post_content, 'oldurl.com', 'newurl.com');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'oldurl.com','newurl.com');
    mysql> set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
    mysql> set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
    mysql> exit;
    if year < 2020 and not (year == 2019 and quarter == 4):
        query_churn = "SELECT sum(eur) FROM salesforce_summaries WHERE (\"Type of Business\" = 'Churn' AND \"Import from Weekly KPI Excel\" = 'True') AND time >= '{quarter_start}' AND time <= '{quarter_end}'".format(
            quarter_start=quarter_start, quarter_end=quarter_end)
CREATE DEFINER=`rdsadmin`@`localhost` PROCEDURE `rds_set_configuration`(IN name VARCHAR(30), IN value INT)
    READS SQL DATA
    DETERMINISTIC
BEGIN
   DECLARE sql_logging BOOLEAN;

   IF name = 'binlog retention hours' AND value NOT BETWEEN 1 AND 168 THEN
       SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'For binlog retention hours the value must be between 1 and 168 inclusive or be NULL';
   END IF;

   SELECT @@sql_log_bin INTO sql_logging;
   SET @@sql_log_bin = OFF;   
   UPDATE mysql.rds_configuration
   SET mysql.rds_configuration.value = value
   WHERE BINARY mysql.rds_configuration.name = BINARY name;
   SET @@sql_log_bin = sql_logging;
END
<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>8.0.25</version>
</dependency>
mysqldump --opt --no-tablespaces --compress -u <username> -p [-h <hostname>] -r <dumpfile.sql> <database>


# mysqldump [--no-tablespaces] --default-character-set=utf8 -e -u $USER -p $DBNAME > /path/to/file.sql
SELECT 
  GROUP_CONCAT(lv SEPARATOR ',')
  #lv
FROM 
  (
    SELECT 
      @pv :=(
        SELECT 
          GROUP_CONCAT(cid SEPARATOR ',') 
        FROM 
          categories 
        WHERE 
          FIND_IN_SET(parent, @pv)
      ) AS lv 
    FROM 
      categories 
      JOIN (
        SELECT 
          @pv := 5
      ) tmp
  ) tmp2
// Custom query that will return the ancestors of a given id, it will
        // return a hierarchical data of parents and children in one query
        // For detailed explanation of the query, please see link below
        // https://explainextended.com/2009/07/20/hierarchical-data-in-mysql-parents-and-children-in-one-query/
        $sql = "
            SELECT t2.id, t2.sender_id, t2.invitee_id, t2.deal_admin_id, t2.agent_structure_id, t3.level, t3.sub_level, t3.position_type
            FROM (
                SELECT
                    @r AS _invitee_id,
                    (SELECT @r := sender_id FROM " . $agentInvitationTable . " WHERE invitee_id = _invitee_id AND status = :status LIMIT 1) AS sender_id,
                    @l := @l + 1 AS lvl
                FROM (SELECT @r := :userId, @l := 0) vars, " . $agentInvitationTable . " t
                WHERE @r <> 0
            ) t1
            JOIN " . $agentInvitationTable . " t2 ON t1._invitee_id = t2.invitee_id
            LEFT JOIN  " . $agentStructureTable . " t3 ON t2.agent_structure_id = t3.id
            WHERE t2.status = :status
            ORDER BY t1.lvl DESC;
        ";
sudo docker build . -t vitesse
from ai_jobs.models import CandidateJobJourney
from ai_api.services import Utils
job_jns = CandidateJobJourney.objects.filter(company_id=1038, journey_id=8747)
#job_jns = CandidateJobJourney.objects.filter(company_id=4318, journey_id=11941)
for jj in job_jns:

    jj_stage_settings = Utils.safe_jsonloads(jj.stage_settings)
    for k, v in jj_stage_settings.items():
        if v.get("interviewers"):
            v.update(interviewers='["r_5"]')
            jj_stage_settings[k] = v
    jj.stage_settings = Utils.safe_json_dumps(jj_stage_settings)
    jj.save()
from ai_jobs.models import Job
from ai_jobs.services import HiringTeamService
from ai_jobs.services.job_management import JobManagementService
from ai_jobs.constants.constants import JobRoleType
for job in jobs:
    try:
        hiring_manage_job_perms = HiringTeamService.get_hiring_manage_job_perms(job)
        hiring_manage_user_job_perms = hiring_manage_job_perms.get(JobRoleType.USER_ID, {})
        hiring_manage_user_job_perms.update({uid: True for uid in user_ids})
        hiring_manage_job_perms.update({JobRoleType.USER_ID: hiring_manage_user_job_perms})
        JobManagementService.update_hiring_team(
            job, users=hiring_manage_user_job_perms.keys(), hiring_manage_job_perms=hiring_manage_job_perms
        )

                             
for job in company_jobs:
    hiring_manage_job_perms = HiringTeamService.get_hiring_manage_job_perms(job)
    hiring_manage_role_job_perms = hiring_manage_job_perms.get(JobRoleType.ROLE_ID, {})
    hiring_manage_role_job_perms.update({uid: True for uid in user_ids})
    hiring_manage_job_perms.update({JobRoleType.ROLE_ID: hiring_manage_role_job_perms})
    JobManagementService.update_hiring_team(
        job, roles=hiring_manage_role_job_perms.keys(), hiring_manage_job_perms=hiring_manage_job_perms
    )
UPDATE `qm_aktuelle_liste` SET params = JSON_INSERT(params, '$.ohneMangel', 'x') WHERE id <300
CREATE TABLE test ( 
  id INT NOT NULL AUTO_INCREMENT,
  name VARCHAR(50) NOT NULL,
  email VARCHAR(100) NOT NULL,
  PRIMARY KEY (id)
);
# If your logged in to mysql (mysql -u root -p) you can create the database
#CREATE DATABASE database_name;
CREATE DATABASE <database> CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci';

# The user can be created with
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'user_password';

# This user also needs access to the database
GRANT ALL PRIVILEGES ON database_name.* TO 'database_user'@'localhost';

# To make the new access rights available you have to reload them
FLUSH PRIVILEGES;

# In file /etc/my.cnf or /etc/mysql/my.cnf (depending on your operating system), change
# "sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES" or add following

[mysqld]
sql_mode=NO_ENGINE_SUBSTITUTION

# This should take care of the problem. Another way  to change sql_mode directly would be

mysql -u root -p -e „SET GLOBAL sql_mode = ‚NO_ENGINE_SUBSTITUTION‘;“

# But the later option only seems to set the mode temporarely, so I would advise going
# for the my.cnf file.
# /etc/my.cnf
# Raise max size to 4GB
SET GLOBAL tmp_table_size = 1024 * 1024 * 1024 * 4;
SET GLOBAL max_heap_table_size = 1024 * 1024 * 1024 * 4;
# If you are checking the above variables with
SELECT @@max_heap_table_size;
# Or
SHOW VARIABLES LIKE 'max_heap_table_size"

# If already a memory table, the alter will not change anything.
# Only apply the new max size.
ALTER TABLE table_name ENGINE=MEMORY;
select * from externalactivity ea 
join crmcache cc on cc.personid = ea.RecipientPersonID
join person p on p.personid = ea.RecipientPersonID
where ea.successdate is null and externalid = 13342
SELECT ea.externalresponse, ea.recipientpersonid, ea.externalid, ea.customfield01, cc.crmid, concat (cc.firstname, ' ', cc.lastname) FROM externalactivity ea join crmcache cc on cc.crmid = ea.RecipientPersonID WHERE SuccessDate IS NULL
IFNULL(tppp.preferredname, 'WA') AS 'SOR'
FROM person p
JOIN student_program sp ON sp.personid=p.personid AND sp.statusid=1 AND sp.is_deleted=0
JOIN enrollment e ON e.personid=p.personid
JOIN enrollmenttostudentdebit esd USING (enrollmentid)
JOIN studentdebit sd USING (studentdebitid)
LEFT JOIN studentdebit asd ON asd.adjustsdebitid=sd.studentdebitid AND asd.obsolete=0
LEFT JOIN thirdpartypayerengagement tppe ON tppe.tppengagementid=sd.tppengagementid
LEFT JOIN thirdpartypayer tpp ON tpp.tppayerid=tppe.tppayerid
LEFT JOIN person tppp ON tppp.personid=tpp.tppayerpersonid
DELIMITER $$
DROP PROCEDURE IF EXISTS sp_no_math_la$$
CREATE PROCEDURE sp_no_math_la()

BEGIN

...


END $$
DELIMITER ;

CALL sp_no_math_la();
-- these scripts will delete the tables if it's already there

DROP TABLE IF EXISTS StudentEnrollments;
DROP TABLE IF EXISTS Students;
DROP TABLE IF EXISTS Classrooms;


-- create and populate the students table
CREATE TABLE Students
(
	StudentId INTEGER PRIMARY KEY,
	FirstName VARCHAR(200) NOT NULL,
	LastName VARCHAR(200) NOT NULL,
	Nationality VARCHAR(100) NOT NULL,
	DateOfBirth DATETIME NULL
);


INSERT INTO Students
	(StudentId, FirstName, LastName, Nationality, DateOfBirth)
VALUES
	('1','Mickey', 'Mouse', 'American', '1991-05-02'),
	('2','Donald', 'Duck', 'Japanese', '1992-11-12'),
	('3','Goofy', 'Goof', 'American', '1980-04-15'),
	('4','Daisy', 'Duck', 'French', '1985-02-16'),
	('5','Huey', 'Duck', 'French', '1986-05-19'),
	('6','Scrooge', 'McDuck', 'Japanese', '1983-11-11'),
	('7','Minnie', 'Mouse', 'Canadian', '1983-11-30'),
	('8','Louie', 'Duck', 'French', '1985-09-09');

-- create and populate the classroom table
CREATE TABLE Classrooms
(
	ClassroomId INTEGER PRIMARY KEY,
	ClassName VARCHAR(200) NOT NULL,
	Weight DECIMAL NOT NULL
);

INSERT INTO Classrooms
	(ClassroomId, ClassName, Weight)
VALUES
	(1, 'Public Interaction', 0.10),
	(2, 'Pranks', 0.15),
	(3, 'Running', 0.15),
	(4, 'Acting', 0.30),
	(5, 'Making Jokes', 0.30);

-- create and populate the student enrollment table
CREATE TABLE StudentEnrollments
(
	StudentEnrollmentId INTEGER PRIMARY KEY,
	StudentId INTEGER NOT NULL,
	ClassroomId INTEGER NOT NULL,
	Grade DECIMAL NOT NULL,
	FOREIGN KEY(StudentId) REFERENCES Students(StudentId),
	FOREIGN KEY(ClassroomId) REFERENCES Classrooms(ClassroomId)
);

INSERT INTO StudentEnrollments
	(StudentEnrollmentId, StudentId, ClassroomId, Grade)
VALUES
	(1, 1, 1, 91),
	(2, 1, 2, 68),
	(3, 1, 3, 89),
	(4, 1, 4, 60),
	(5, 1, 5, 65),
	(6, 2, 1, 79),
	(7, 2, 2, 85),
	(8, 2, 3, 68),
	(9, 2, 4, 89),
	(10, 2, 5, 80),
	(11, 3, 1, 96),
	(12, 3, 2, 62),
	(13, 3, 3, 78),
	(14, 3, 4, 100),
	(15, 3, 5, 64),
	(16, 4, 1, 81),
	(17, 4, 2, 90),
	(18, 4, 3, 85),
	(19, 4, 4, 95),
	(20, 4, 5, 64),
	(21, 5, 1, 81),
	(22, 5, 2, 73),
	(23, 5, 3, 60),
	(24, 5, 4, 99),
	(25, 5, 5, 70),
	(26, 6, 1, 75),
	(27, 6, 2, 74),
	(28, 6, 3, 69),
	(29, 6, 4, 79),
	(30, 6, 5, 88),
	(31, 7, 1, 60),
	(32, 7, 2, 75),
	(33, 7, 3, 82),
	(34, 7, 4, 66),
	(35, 7, 5, 65),
	(36, 8, 1, 69),
	(37, 8, 2, 81),
	(38, 8, 3, 100),
	(39, 8, 4, 63),
	(40, 8, 5, 62);
CONCAT(',', section_id, ',') REGEXP ',(val1|val2|val3),'"
UPDATE deltadb.transactions_temp
SET ticker =(CASE CEIL(RAND()*2)
              WHEN 1 THEN '3CN:SP'
              WHEN 2 THEN 'AGV:SP'
          END);
SELECT ticker,`datetime`
FROM (
  SELECT ticker, MAX(`datetime`) `datetime`
  FROM Bloomberg_hist_data
  GROUP BY ticker
) t ORDER BY `datetime`
CURRENT_TIMESTAMP	ON UPDATE CURRENT_TIMESTAMP
CREATE TABLE firends (
	id INTEGER,
  	firstname VARCHAR(64)
);
Db::getInstance()->executeS("DELETE FROM product_images WHERE id_product NOT IN (" . join($allProductIds,',') . ")")
SELECT id, account_id, amount, created_at, null as type
 	FROM subscription_invoice
UNION ALL
SELECT id, account_id, amount, created_at, 
	`type` as type
FROM subscription_payment
ORDER BY created_at DESC
ALTER DATABASE database CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
sudo killall mysqld
sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
[root@jiaoyou mysql]# pwd
/var/lib/mysql
[root@jiaoyou mysql]# ls -ls
338256 -rw-rw---- 1 mysql mysql 346030080 2010-04-22 08:08 ibdata1
626812 -rw-rw---- 1 mysql mysql 641222072 2010-01-26 07:17 mysql-bin.000008
316892 -rw-rw---- 1 mysql mysql 324173772 2010-03-25 12:51 mysql-bin.000009
52724 -rw-rw---- 1 mysql mysql  53931666 2010-04-12 12:13 mysql-bin.000010
10136 -rw-rw---- 1 mysql mysql  10359639 2010-04-22 08:32 mysql-bin.000011

mysql> SHOW BINARY LOGS; 
+------------------+-----------+
| Log_name         | File_size |
+------------------+-----------+
| mysql-bin.000008 | 641222072 | 
| mysql-bin.000009 | 324173772 | 
| mysql-bin.000010 |  53931666 | 
| mysql-bin.000011 |  10360680 | 
+------------------+-----------+


Solution

PURGE BINARY LOGS TO 'mysql-bin.010';
star

Thu May 26 2022 14:07:36 GMT+0000 (UTC)

#drupal #mysql
star

Mon May 09 2022 19:58:09 GMT+0000 (UTC)

#mysql
star

Mon Apr 25 2022 18:35:28 GMT+0000 (UTC)

#sql #mysql
star

Fri Apr 22 2022 18:52:53 GMT+0000 (UTC)

#ci #mysql #portal
star

Fri Apr 22 2022 18:51:59 GMT+0000 (UTC)

#ci #mysql #portal
star

Fri Apr 22 2022 18:50:28 GMT+0000 (UTC)

#ci #mysql #portal
star

Sat Apr 16 2022 22:53:29 GMT+0000 (UTC)

#mysql
star

Fri Feb 25 2022 12:24:42 GMT+0000 (UTC) https://stackoverflow.com/questions/136782/convert-from-mysql-datetime-to-another-format-with-php

#php #date #mysql
star

Sat Feb 12 2022 23:13:25 GMT+0000 (UTC) https://stackoverflow.com/questions/9620198/how-to-get-the-sizes-of-the-tables-of-a-mysql-database

#mysql
star

Thu Jan 27 2022 08:33:32 GMT+0000 (UTC)

#mysql #mysqldump #remote
star

Wed Dec 22 2021 16:17:30 GMT+0000 (UTC) https://dba.stackexchange.com/questions/76788/create-a-mysql-database-with-charset-utf-8

#sql #mysql #mysql5.7
star

Thu Dec 09 2021 11:10:27 GMT+0000 (UTC)

#mysql #wordpress
star

Mon Dec 06 2021 17:34:36 GMT+0000 (UTC) https://stackoverflow.com/questions/23921117/disable-only-full-group-by

#mysql
star

Thu Nov 25 2021 14:40:12 GMT+0000 (UTC) https://gitlab.hornetsecurity.com/search?group_id

#python #mysql
star

Fri Nov 19 2021 08:45:09 GMT+0000 (UTC) https://www.reddit.com/r/aws/comments/gj1i1u/permanently_setting_binlog_retention_period_on/

#mysql #binlog
star

Tue Oct 19 2021 23:21:22 GMT+0000 (UTC) https://stackoverflow.com/questions/33123985/cannot-load-driver-class-com-mysql-jdbc-driver-spring/33124093

#mysql
star

Mon Oct 04 2021 14:33:05 GMT+0000 (UTC)

#mysql
star

Tue Sep 14 2021 06:05:48 GMT+0000 (UTC)

#mysql
star

Tue Aug 24 2021 06:36:11 GMT+0000 (UTC) https://explainextended.com/2009/07/20/hierarchical-data-in-mysql-parents-and-children-in-one-query/

#mysql
star

Tue Aug 17 2021 13:18:20 GMT+0000 (UTC)

#shell #mysql
star

Fri Jul 30 2021 13:35:57 GMT+0000 (UTC)

#shell #mysql
star

Fri Jul 30 2021 11:22:00 GMT+0000 (UTC)

#shell #mysql
star

Wed Jul 07 2021 14:11:01 GMT+0000 (UTC)

#mysql #json #update
star

Sun Jun 13 2021 04:34:51 GMT+0000 (UTC)

#sql #mysql
star

Sun Jun 13 2021 04:23:51 GMT+0000 (UTC)

#sql #mysql
star

Fri Jun 11 2021 14:23:59 GMT+0000 (UTC)

#database #mysql
star

Mon Jun 07 2021 20:53:33 GMT+0000 (UTC) https://www.neovision.ch/wie-sie-den-strict-modus-von-mysql-deaktivieren-konnen/

#mysql #strict #no-default-value
star

Thu May 27 2021 02:07:15 GMT+0000 (UTC)

#mysql
star

Wed May 26 2021 14:47:11 GMT+0000 (UTC)

#mysql
star

Thu May 20 2021 18:48:25 GMT+0000 (UTC)

#mysql
star

Thu May 13 2021 15:59:59 GMT+0000 (UTC)

#mysql
star

Sun May 02 2021 09:41:55 GMT+0000 (UTC) https://static.skillshare.com/uploads/attachment/1192226128/8c1374ad/Create%20the%20Initial%20Tables%20Script.txt

#sql #mysql
star

Fri Apr 23 2021 03:00:36 GMT+0000 (UTC)

#mysql
star

Wed Apr 07 2021 13:17:21 GMT+0000 (UTC)

#mysql
star

Fri Apr 02 2021 14:04:01 GMT+0000 (UTC)

#mysql
star

Wed Mar 31 2021 04:36:51 GMT+0000 (UTC)

#mysql
star

Wed Mar 31 2021 04:36:19 GMT+0000 (UTC)

#mysql
star

Wed Mar 24 2021 11:01:54 GMT+0000 (UTC)

#mysql
star

Fri Dec 11 2020 11:39:30 GMT+0000 (UTC)

#sql #mysql
star

Tue Oct 27 2020 17:03:36 GMT+0000 (UTC)

#sql #mysql
star

Thu Sep 17 2020 09:02:02 GMT+0000 (UTC) https://stackoverflow.com/questions/21267064/mysql-database-wont-start-in-xampp-manager-osx

#mysql
star

Mon Aug 10 2020 07:06:36 GMT+0000 (UTC) https://serverfault.com/questions/134840/what-are-these-files-can-i-delete-them-manually

#mysql

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension