logs archiveChat DB / Freenode / #mysql / 2015 / October / 2 / 1
desnudopenguino
thanks mgriffin, that should point me in the right direction
saml
select * from foo where url like '%//%' but exclude 'http://%'; how can I do this?
mgriffin
saml: http://pastie.org/10454814
saml
mgriffin, i get different result
mgriffin
!t saml sqlfiddle
ubiquity_bot
saml: sqlfiddle.com is an easy way to share your schema, your data, and the queries you're testing. It saves us time and makes it more likely that you'll get an answer! (Make sure you set it to use MySQL.)
saml
and that's not exactly what i want. i do want http:// but only want to find urls that have // in path.
yah i should fiddle it
mgriffin
perhaps it was my leading % in not like
(missed the requirement that this be the start of the column's content)
is guess "tuple" is the concise word for "specific column of a single row"
saml
mgriffin, http://sqlfiddle.com/#!2/7e6027/2 something like this
match // but that does not prefixed with http:
but mysql regexp doesn't seem to have lookbehind
select * from foo where url like '%//%//%'; oh i can do this. i so dumb
mgriffin
saml: in your fiddle: select url from foo where url like '%//%' and url not like '%http://%';
should do what you asked about
kairoz
should I not use "source all-databases-backup.sql" to import a full database backup? I'm seeing statements try to load data into tables which aren't there.
mgriffin
oh i see what you are asking now
!t kairoz import
ubiquity_bot
kairoz: mysql -u uname -p dbname < yourfile.sql
mgriffin
all databases means leave out "dbname"
kairoz
ok
mgriffin
kairoz: how did you take the backup? using "mysqldump -A > all-databases-backup.sql"
(same as mysqldump --all-databases > all-databases-backup.sql"
saml
mgriffin, no. i want LIKE 'http://%//%'
mgriffin
saml: using sed is an option
kairoz
mgriffin: mysqldump --single-transaction --master-data --all-databases > sept.sql
mgriffin
kairoz: mysql < sept.sql
(do this in a screen)
kairoz: you need to run "flush privileges" afterward
kairoz
mgriffin: so running "source sept.sql" from within the mysql client is different from mysql < sept.sql ?
mgriffin
kairoz: should be pretty similar.
kairoz: not sure if "source" stops on errors like "mysql" (without --force) would
kairoz
mgriffin: I'm seeing a lot of errors like "ERROR 1146 (42S02): Table 'shard_grid_007.history_gridRow' doesn't exist", which seems odd to me, because I'd expect the mysqldump to create that table
mgriffin
kairoz: grep -n ^CREATE sept.sql > create_tables.txt
kairoz
huh, i thought you had to have grep -E to use ^. TIL.
mgriffin
kairoz: you can then use sed -n the extract some lines to examine
kairoz: so maybe this particular db's "history_gridRow" table starts at line 1000 and this same db's "foo" table starts at 1500
kairoz: sed -n '1000,1499p;1500q' sept.sql > shard_grid_007.history_gridRow.dumptest
kairoz
mgriffin: i'm running cat sept.sql | grep -E "^CREATE TABLE|^DROP TABLE|^USE" > manip.txt
mgriffin
kairoz: k.
jmpp
(Action) greets!
I'm using statement-based replication, and I want to enable the general log in one of the slaves.
is it possible to not log the replicated statements to it?
i.e. is it possible to keep the replicated statements from being logged to the general log as the sql thread executes them?
mgriffin
jmpp: if it *does* log the sql_thread you probably can't disable that (guessing)
jmpp: you can stop slave sql_thread for a while, you don't plan to have general log on long probably?
jmpp
no, definitely not
just trying to debug why the server is not getting any connections
it's behind a balancer that distributes read requests
mgriffin
is it failing health check?
jmpp
and for some reason the balancer is not forwarding any connections to it
nope
if I stop the server, the balancer disables the node
OK
bring mysql back up, the balancer renables it
however, no read connections seem to reach it
mgriffin
what is the lb algorithm?
jmpp
the other node gets a bunch of requests, this one apparently none
weighted least connections, both nodes having the same weight of 1
mgriffin
with no persistence?
does your app use a connection pool?
jmpp
nope, no connection pool
but the balancer does have persistance enabled
mgriffin
if you use persistent connections then maybe this is the problem?
app has not reconnected yet
jmpp
yeah, trying that
mgriffin
i assume this vip is for slave / "read only" portion of app
jmpp
yeap
I think that was it
mgriffin
cool
jmpp
persistance
(Action) hugs mgriffin!
mgriffin
while you are at it, make sure that your wait_timeout is shorter than the lb's tcp timeout (and longer than your apps persistent connection life)
(by increasing timeout on lb if necessary, or decreasing timeout in app)
jmpp: ^
hassoon
jmpp: v
(Action) hides
mgriffin
*flip tables ascii art*
danblack: http://lists.mysql.com/replication/2521 wonder if this is not a commonly known problem
(mysqld restart, stop slave, or relay_log_space_limit is encountered)
jmpp
heyya, hadn't read you
let me get to it
schneider
will be that faster for accessing data if i'll crete a separate table to numerate all countries for example and insert numbers of country in another table instead of current name of the country?
thumbs
schneider: it depends
schneider
it depends on what for example?
thumbs
schneider: learn how to use EXPLAIN and indexes
schneider
thanks
extor
I installed VS2015 community edition, then downloaded mysql-installer-community-5.6.26.0 and while running the install it says visual studio is not installed.
Strangely I don't see the 64 bit version of the installer on the page either
clockers
mysql --port=1111 *otherstuff here* <-- why is this not using port 1111?
threnody
er, because it's localhost and using a unix socket?
« prev