How to export import content from inside a table using mysql commands

I’m transferring a WordPress site to a new server, but I’m trying to do the process as clean as possible. However, since I have to transfer a lot of posts to the new database, and the export feature on WP doesn’t work well, I exported only the essentials tables, and then I’m configuring everything again from scratch.

The only problems is that I’m using the TablePress plugin which stores its data in the wp_posts and wp_postmeta tables, and the settings in the wp_options table.

Since I already the restored the posts using the wp_posts and wp_postmeta, the entries from TablePress plugins are already in the database, but the content doesn’t show up in the plugin, because the index and option are located in the wp_options, which I’m configuring again from scratch.

The plugin developers has suggested that I can export the tablepress_tables and tablepress_options entries from the wp_options, but neither him or I knows the syntax to export and import the entries from a tablet, in this case from the wp_options table in mysql without using phpmyadmin, since it’s not available in the server.

So I wanted to ask if anyone could help figuring out the how to export tablepress_tables and tablepress_options entries from inside the wp_options table inside a database called wordpress using command line on mysql 5.7?

Thanks,

import – Difficultly importing GeoTiff format

I downloaded Earth data from here. It is a GeoTiff file, which is a map of solar radiation falling on earth.

enter image description here

Mathematica claims to import GeoTiff files. However, when I import,

SetDirectory[NotebookDirectory[]]
files = FileNames["*", "./diffuse/"][[1]]
diffuse = Import[files, {"GeoTIFF", "Image"}]

The output is an error:

LinkObject::linkd: Unable to communicate with closed link LinkObject['/Applications/Mathematica.app/Contents/SystemFiles/Converters/Binaries/MacOSX-x86-64/GDAL.exe',6300,8].
Import::fmterr: Cannot import data as GeoTIFF format.

I can get the file to open using other GeoTiff programs such as QCIS. So it does seem to be a Mathematica issue. Any ideas? It is an error which I have not encountered before.

percona – MySQL error when trying to import tablespace

I’m following the steps described here, but the import of one of the tables is failing with the error below. It’s a large table, with a ~22GB .idb file.

[ERROR] [MY-012762] [InnoDB] Page offset doesn't match file offset: page offset: 262144, file offset: 262144

For what is worth, I’m using Percona 8 and not the vanila MySQL.

Any help is much appreciated.

parallelization – Parallelize import of many files

I’m trying to speed up the import of a large number of files, using ParallelTable to store them in a indexed variable, eqDump. The files are in the folder “Frames” and are named “Conf_Run.1000”, “Conf_Run.2000”, … Here is what I’ve tried,

    Clear[eqDump];    
    SetSharedFunction[eqDump];
    ParallelTable[
      eqDump
                    ,"Table"
                    ,HeaderLines -> 9]
    ,{t, 5000, 1000000, 5000}];

But the execution doesn’t even seems to start, the kernels remain idle. I don’t know whats happening, since I think it should work in the same way as here for example. I’ve tried also to SetSharedVariable

Thank you very much!

ssms – Data-tier .bacpac import keeps failing

Within a container, I have SqlServer running in a docker container. It was created like so:

docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$1" -p 1433:1433 --name sql1 -v sql1-sqlvolume:/var/opt/mssql -d mcr.microsoft.com/mssql/server:2017-latest

I then use SSMS to import a data-tier application. Then in the wizard I import from disk and verify all the data until it then runs the import.

With Sql Server Settings:

Data file path: /var/opt/mssql/data
Log file path: /var/opt/mssql/data

But every time, it fails with this:

Creating database on target - Success
Importing database - Error
Creating deployment plan - Error
Initializing deployment - Error
Refreshing Object Exporer - Success

The Error is:

===================================

Object reference not set to an instance of an object. (Microsoft.Data.Tools.Schema.Sql)

------------------------------
Program Location:

at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.DeploymentScriptDomGenerator.GenerateFragment(Int32 operation, IModelElement element)
at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.DeploymentScriptDomGenerator.GenerateSteps(Int32 operation, IModelElement element)
at Microsoft.Data.Tools.Schema.Sql.Deployment.OrderedStepGenerator.Add(DeploymentScriptDomGenerator scriptDom, IModelElement element, Int32 operation)
at Microsoft.Data.Tools.Schema.Sql.Deployment.Analyzers.PlanMediator.BuildDependencyOrderedSteps(Int32 operation, List`1 classOrder, List`1 operationOrder, Dictionary`2 changes, Boolean preserveGraphs, Dictionary`2& relating, Dictionary`2& related)
at Microsoft.Data.Tools.Schema.Sql.Deployment.Analyzers.PlanMediator.BuildOperations()
at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.OnGeneratePlan()
at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.GeneratePlan(List`1 drops)
at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.BuildPlan()
at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.Controller.CreatePlan()
at Microsoft.SqlServer.Dac.DeployOperation.<>c__DisplayClass3.<>c__DisplayClass5.<CreatePlanInitializationOperation>b__1()
at Microsoft.Data.Tools.Schema.Sql.Dac.OperationLogger.Capture(Action action)
at Microsoft.SqlServer.Dac.DeployOperation.<>c__DisplayClass3.<CreatePlanInitializationOperation>b__0(Object operation, CancellationToken token)
at Microsoft.SqlServer.Dac.Operation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.ReportMessageOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.DeployOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.OperationExtension.Execute(IOperation operation, DacLoggingContext loggingContext, CancellationToken cancellationToken)
at Microsoft.SqlServer.Dac.DacServices.InternalDeploy(IPackageSource packageSource, Boolean isDacpac, String targetDatabaseName, DacDeployOptions options, CancellationToken cancellationToken, DacLoggingContext loggingContext, Action`3 reportPlanOperation, Boolean executePlan)
at Microsoft.SqlServer.Dac.DacServices.ImportBacpac(BacPackage package, String targetDatabaseName, DacImportOptions importOptions, Nullable`1 cancellationToken)
at Microsoft.SqlServer.Dac.DacServices.ImportBacpac(BacPackage package, String targetDatabaseName, DacAzureDatabaseSpecification creationDefaults, Nullable`1 cancellationToken)
at Microsoft.SqlServer.Management.Dac.DacWizard.ImportDatabase.DoWork()
at Microsoft.SqlServer.Management.TaskForms.SimpleWorkItem.Run()

Can anybody see what I am doing wrong here?

Thanks
Eric