dynamically changing the values of database system variables set in an option file - mysql

In MySQL SET syntax page it says following: "To make a global system variable setting permanent, you should set it in an option file". Does this mean that I will not be able to dynamically change the values of variables set in the option file? (I want to change them iteratively via some script).

No, it simply means you are setting a global default value that will survive restarts of the service. The SET command will still override any defaults in the scope specified (global, session, etc.).
If you are using SET GLOBALs, you have probably already overridden option file defaults.

Related

In Palantir Foundry's Workshop, how do I clear the default Workshop variable values I saved earlier?

Palantir Foundry's Workshop allows us to save default values for variables using the "save and publish with current variable values as default" button. Can these default values be cleared out or reset?
If you want just to change the default to something else, you can choose another option and save with current variables - that will not clear the default, just change it.
To reset the default:
Go to variables
Choose the dependency graph
Search for the variable
Open Debugger on the top right
Clear the value
Save again with current variables (which will clear the default)
This is useful if you saved a dropdown list to a value for consistent debugging while developing, and now want to release with the first item in the list, which will chosen by default (if it is clear).
Note: Simply using Save and publish will still retain the older default value, so above steps are necessary.

What is the correct template to call NVCC (Cuda 9.0) from the command line? [duplicate]

Basically, I know I can go through my control panel and modify the path variable. But, I'm wondering if there is a way to through batch programming have a temporary path included? That way it is only used during that batch file execution. I don't want to have people go in and modify their path variables just to use my batch file.
Just like any other environment variable, with SET:
SET PATH=%PATH%;c:\whatever\else
If you want to have a little safety check built in first, check to see if the new path exists first:
IF EXIST c:\whatever\else SET PATH=%PATH%;c:\whatever\else
If you want that to be local to that batch file, use setlocal:
setlocal
set PATH=...
set OTHERTHING=...
#REM Rest of your script
Read the docs carefully for setlocal/endlocal , and have a look at the other references on that site - Functions is pretty interesting too and the syntax is tricky.
The Syntax page should get you started with the basics.
There is an important detail:
set PATH="C:\linutils;C:\wingit\bin;%PATH%"
does not work, while
set PATH=C:\linutils;C:\wingit\bin;%PATH%
works. The difference is the quotes!
UPD also see the comment by venimus
That's right, but it doesn't change it permanently, but just for current command prompt.
If you wanna to change it permanently you have to use for example this:
setx ENV_VAR_NAME "DESIRED_PATH" /m
This will change it permanently and yes, you can overwrite it in another batch script.

Where to modify $cfg['RowActionLinksWithoutUnique']?

I wanted to set $cfg['RowActionLinksWithoutUnique'] to TRUE so that I can edit the datas in phpMyAdmin without any Primary Keys present, but after checking over config.inc.php and both layout.inc.php in phpmyadmin/themes/
I can't find the mentioned configuration.
Does anyone know how where can I modify $cfg['RowActionLinksWithoutUnique'] ?
Currently using phpMyAdmin via XAMPP Control Panel v3.2.2.
There are default directives, and you only need to put something in config.inc.php if you are changing from the default. In fact, the official phpMyAdmin distribution doesn't come with a config.inc.php at all; if you need to change some value you have to create the file yourself. Since you're trying to change a setting that doesn't already exist in your configuration, you simply have to add it to config.inc.php. Just find a good section, anywhere will do really (I like to keep it near the top so it's visually separated from the server-specific settings), and add the complete line like $cfg['RowActionLinksWithoutUnique'] = true;
Save the file, logout and log back in so the changes are loaded, and you should be all set.
You can see more information in the phpMyAdmin manual.
Just open XAMPP and click on "Config" in the Apache module. Then select "phpMyAdmin (config.inc.php)".
Don't forget to set the semicolon ';' at the end of the variable.
$cfg['RowActionLinksWithoutUnique'] = true;

SSIS parametrize connection strings

I am trying to set up deployment process for single package usinig project deployment so VS2012. I found that to change dynamicaly connection string on the server I can parametrize connections so I did this and created enviroments and I run my package with inviroment which has connnections strings as parameters and all seems to be fine, but why on connection manager I can still see some old setup made while developing? How can I remove it ?
By Parameterize, I assume you're using the Configuration section to globally configure a project/package or on a per-execution basis. This is in contrast to using project/package Parameters
I have created an SSIS Environment variable named ConnectionStrings in my deployment folder and it has two values: ServerName and CatalogName.
I right clicked on my project, DeployMe, and selected Configure. In your screenshot, you have clicked on the specific package and selected Configure. That or you manually changed the Scope drop down.
I first click on the References and add a pointer to my Environment
Back to the Parameters tab, I click over to Connection Managers and I'm going to configure the CM_Project connection manager's ServerName property to use my environment variable's ServerName value. Clear right?
After configuring the ServerName, I also configured the InitialCatalog property but instead of using my Environment Variable's value, I used the "Edit Value" option (above) to set it. The net result is that my properties now look like this.
The underscore indicates it's set from an environment variable
The bold text indicates it's set manually.
Now when I go to run my package, via Agent or manual execution, the first thing it's going to prompt me for is an environment reference. I've lost my bolding for the InitialCatalog but the underlining remains for ServerName property. None-the-less, both are different values and were I to execute it, they would pick up the correct values.
All that said, I find it far easier to just store the whole ConnectionString value. You will observe, if you take this route, that the values displayed for ServerName would show your design-time values but that's fine because the ConnectionString as a whole will override the individual values at run-time.
I know this is a generic answer but I'm hoping I've hit on what you're missing step-wise.

How to persist variable value in Jenkins

I am a newbie to Jenkins. Basically I want to increment a variable value each time after a job is executed. I created a global variable (Manage Jenkins-->Configure System) with some initial value. Now I want this variable value to be incremented each time after my job is executed.
How to go about this? Thanks in advance for any help.
You could keep the current value in a file, and put the file somewhere outside the workspace.
This way you can read it every time you want to, just by checking the file. When you need to update the number, just create a new file, with the value.
Unfortunately, every build creates a new session, so unless you have a global variable defined in the shell itself (outside of Jenkins, like PATH, using (for example) the /etc/profile file) AND have the ability to update it on the fly, it seems very unlikely to work.
Maybe you should consider using $BUILD_NUMBER variable? It is incremented by one for each build.
Use a property value from a file as part of your build and configure a post build action that will check the file with the updated value back into your version control system..
Depending on what number you need you might also want to look at e.g. the maven build number plugin and such things.