S
S
sputnickk2020-02-04 10:33:52
MySQL
sputnickk, 2020-02-04 10:33:52

How to clean up a table?

Hello! Guys tell me how to solve the charade with little blood. I have a website, everything is OK, there is a fat gallery plugin - about 20 galleries. Everything worked great. Then they installed some kind of buggy plugin like buttons and I don’t know by what miracle with the settings table, here - SELECT * FROM `wp_options` WHERE `option_name` = 'fat-gallery-settings' along with the necessary settings, the slash characters '/' appeared for two hundred megabytes .... go like this ////////////////////////...
Probably at the beginning there are norms of settings, and then clogged with these slashes.

The site is dumb. I downloaded the dump, I thought to manually clean the slashes, but on a modern machine, a 200-meter dump opened in notepad ++ tightly hangs the computer ...

I think it is necessary by means of sql.... how would it be so that the settings are not affected? This "delete FROM `wp_options` WHERE `option_name` = 'fat-gallery-settings'" is of course a radical solution, but then you will have to rebuild all the galleries.

SOLUTION:

Olekh , thanks, you gave me the idea and everything worked out,

I chose and exported only the required selection:

SELECT *
FROM `wp_options`
WHERE (
(
`wp_options`.`option_id` =4981
)
)
AND (
`option_name` = 'fat-gallery-settings'
)


The data turned out to be only 100 mb, and the viewer of text files showed the total commander without any problems:

https://i.imgur.com/b4MLVps.png

Next, I started the insert request https://i.imgur.com/b4MLVps.png and end https://i.imgur.com/TzEv2sw.png without slashes..

crashed the current field:

delete  FROM `wp_options` WHERE  `option_name` = 'fat-gallery-settings'


and ready inserts inserted what was without slashes.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sputnickk, 2020-02-04
@sputnickk

SOLUTION:
Olekh , thanks, you gave me the idea and everything worked out,
I chose and exported only the required selection:

SELECT *
FROM `wp_options`
WHERE (
(
`wp_options`.`option_id` =4981
)
)
AND (
`option_name` = 'fat-gallery-settings'
)

The data turned out to be only 100 mb, and the viewer of text files showed the total commander without any problems:
https://i.imgur.com/b4MLVps.png
Next, I started the insert request https://i.imgur.com/b4MLVps.png and end https://i.imgur.com/TzEv2sw.png without slashes..
crashed the current field:
delete  FROM `wp_options` WHERE  `option_name` = 'fat-gallery-settings'

and with a ready-made insert inserted what was without slashes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question