what are flags in mysql? - mysql

I just wanna ask, what are those things called as "flags" in mysql ?
What are they, kindly explain and how they are used.

mysql flags are used by the compiler and set the enviroment you wish to work in.
There's flags such as:
'--with-archive-storage-engine'
wgich does what it states, it would start mysql process but also start the system in archive able content mode
Some more examples:
'--prefix=/usr/local/mysql' \
'--disable-dependency-tracking' \
'--enable-assembler' \
'--localstatedir=/usr/local/mysql/data' \
'--libexecdir=/usr/local/mysql/bin' \
'--libdir=/usr/local/mysql/lib' \
'--enable-local-infile' \
'--enable-shared' \
'--enable-thread-safe-client' \
'--with-archive-storage-engine' \
'--with-big-tables' \
'--with-comment=MySQL Community Server (GPL)' \
'--with-extra-charsets=complex' \
'--with-innodb' \
'--with-mysqld-ldflags=-all-static' \
'--with-readline' \
'--with-server-suffix=-standard' \
'--with-unix-socket-path=/tmp/mysql.sock' \
'--with-zlib-dir=bundled' \
'--without-debug' \
'--without-docs' \
'--without-man'

Related

Ignore errors while loading to Mysql from Pyspark

In redshift we can have maxerror Option
df.write.option("url", jdbc_url) \
.option("dbtable", tbl) \
.option("tempdir", tmp_folder_rs) \
.option("aws_iam_role", rs_iam) \
.option("extracopyoptions", "**maxerror as 100000** blanksasnull") \
.mode("append") \
.save()
which gives it a tolerance of some records while loading.
Do we have similar options for MYSQL. My write to mysql is as below
job_status_event_req_cols.write.format("jdbc").option("url", "jdbc:mysql://test.us-west-1.vpce.amazonaws.com/test").option("driver", "com.mysql.jdbc.Driver").option("dbtable", "employee").option("user", "writer").option("password", "test").mode('append').save()

How to capture terminal screen output (with ansi color) to an image file?

I tried the following command to capture the output of a command (grep as an example) with color. But the result is shown as ^[[01;31m^[[Ka^[[m^[[K.
grep --color=always a <<< a |
a2ps -=book -B -q --medium=A4dj --borders=no -o out1.ps &&
gs \
-sDEVICE=png16m \
-dNOPAUSE -dBATCH -dSAFER \
-dTextAlphaBits=4 -q \
-r300x300 \
-sOutputFile=out2.png out1.ps
Is there a way to capture the color in the image? Thanks.

Sending HTML by cURL on MAILGUN

I tried to send this by email. I tried a lot of ways and always I obteined the same thing: an error.
http://goto-21.net/campaign/htmlversion?mkt_hm=0&AdministratorID=47507&CampaignID=58&StatisticID=62&MemberID=733807&s=994508d6292a660150ccc60c3f0310d4&isDemo=0
I tried with this:
curl -s --user 'api:key-3ax6xnjp29jd6fds4gc373sgvjxteol0' \
Xhttps://api.mailgun.net/v2/samples.mailgun.org/messages \
-F from='Excited User ' \
-F to='foo#example.com' \
-F cc='bar#example.com' \
-F bcc='baz#example.com' \
-F subject='Hello' \
-F text='Testing some Mailgun awesomness!' \
-F html=' CODE HERE ' \
And this:
curl -s --user 'api:key-3ax6xnjp29jd6fds4gc373sgvjxteol0' \
Xhttps://api.mailgun.net/v2/samples.mailgun.org/messages \
-F from='Excited User ' \
-F to='foo#example.com' \
-F cc='bar#example.com' \
-F bcc='baz#example.com' \
-F subject='Hello' \
-F text='Testing some Mailgun awesomness!' \
--form-string html=' CODE HERE ' \
But it doesnt work...Always ''syntax error''
Anyone can help me?
Thank you!
Use the following cURL command to send HTML emails using the command line.
Replace the uppercase parameter with your own and you're ready to send!
curl -s --user 'api:YOUR-API-KEY' https://api.mailgun.net/v2/YOURDOMAIN/messages -F from='YOU#YOURPROVIDER.COM' -F to=RECEIVER#PROVIDER.com -F subject='Hello World with HTML' -F html='<html><head><title>Hello</title></head><body>Hello <strong>World</strong></body></html>' -F text='Hello world'
What this does is send an email from an address attached to your domain to a receiver sending html and plain text version as a fall back!
Happy mailgunning
Best,
the origin request is looks like:
curl -s --user 'api:key-3ax6xnjp29jd6fds4gc373sgvjxteol0' \
https://api.mailgun.net/v3/samples.mailgun.org/messages \
-F from='Excited User <excited#samples.mailgun.org>' \
-F to='devs#mailgun.net' \
-F subject='Hello' \
-F text='Testing some Mailgun awesomeness!'
but you have a big X before https.
curl -s --user 'api:key-3ax6xnjp29jd6fds4gc373sgvjxteol0' \
-------> X <----- https://api.mailgun.net/v2/samples.mailgun.org/messages \ -F from='Excited User ' \ -F to='foo#example.com' \ -F cc='bar#example.com' \ -F bcc='baz#example.com' \ -F subject='Hello' \ -F text='Testing some Mailgun awesomness!' \ --form-string html=' CODE HERE ' \
maybe this cause an error

how to link static jemalloc for mysql5.5

I want to link static jemalloc library for oracle mysql5.5 .If mysql5.1 ,i can do it :
LDFLAGS=” -lrt -ljemalloc -lstdc++ ”
./configure –prefix=/usr/soft/install/mysql \
–with-mysqld-user=mysql \
–with-plugins=partition,blackhole,csv,heap,innobase,myisam,myisammrg \
–with-charset=utf8 \
–with-collation=utf8_general_ci \
–with-extra-charsets=gbk,gb2312,utf8,ascii \
–with-big-tables \
–with-fast-mutexes \
–with-zlib-dir=bundled \
–enable-assembler \
–enable-profiling \
–enable-local-infile \
–enable-thread-safe-client \
–with-readline \
–with-pthread \
–with-embedded-server \
–with-mysqld-ldflags=-all-static \
–without-query-cache \
–without-geometry \
–without-debug \
–without-ndb-debug
make && make install
But i can not find a cmake's option with it in mysql5.5.
What can i do?

MooTools build hash in 1.2.4.4

We are trying to upgrade our MooTools installation from 1.2.4 to 1.2.6. The original developer included a "more" file with optional plugins, but because it is compressed we can't tell what was included in that file. I'd rather not hunt and pick through the code.
I noticed the compressed more file has a build hash in the header (6f6057dc645fdb7547689183b2311063bd653ddf). The 1.4 builder located here will let you just append that hash to the url and create a build. It doesn't seem the 1.2 version supports that functionality.
Is there an easy way to determine from the hash or the compressed file what plugins are included in this 1.2 build?
AFAIK there's no way to get the list of plugins directly from the build hash. But if you have access to a UNIX shell, save the following shell script as find_plugins.sh:
#!/bin/sh
for PLUGIN in \
More Lang Log Class.Refactor Class.Binds Class.Occlude Chain.Wait \
Array.Extras Date Date.Extras Hash.Extras String.Extras \
String.QueryString URI URI.Relative Element.Forms Elements.From \
Element.Delegation Element.Measure Element.Pin Element.Position \
Element.Shortcuts Form.Request Form.Request.Append Form.Validator \
Form.Validator.Inline Form.Validator.Extras OverText Fx.Elements \
Fx.Accordion Fx.Move Fx.Reveal Fx.Scroll Fx.Slide Fx.SmoothScroll \
Fx.Sort Drag Drag.Move Slider Sortables Request.JSONP Request.Queue \
Request.Periodical Assets Color Group Hash.Cookie IframeShim HtmlTable \
HtmlTable.Zebra HtmlTable.Sort HtmlTable.Select Keyboard Keyboard.Extras \
Mask Scroller Tips Spinner Date.English.US Form.Validator.English \
Date.Catalan Date.Czech Date.Danish Date.Dutch Date.English.GB \
Date.Estonian Date.German Date.German.CH Date.French Date.Italian \
Date.Norwegian Date.Polish Date.Portuguese.BR Date.Russian Date.Spanish \
Date.Swedish Date.Ukrainian Form.Validator.Arabic Form.Validator.Catalan \
Form.Validator.Czech Form.Validator.Chinese Form.Validator.Dutch \
Form.Validator.Estonian Form.Validator.German Form.Validator.German.CH \
Form.Validator.French Form.Validator.Italian Form.Validator.Norwegian \
Form.Validator.Polish Form.Validator.Portuguese \
Form.Validator.Portuguese.BR Form.Validator.Russian \
Form.Validator.Spanish Form.Validator.Swedish Form.Validator.Ukrainian
do
grep -q -F $PLUGIN $1 && echo $PLUGIN
done
Then run it like this passing the filename of your MooTools More file as first argument:
sh find_plugins.sh mootools-more.js
It will print out a list of all plugin names found in the JS code. That should get you started.