Emily,

I think you should restart mysqld (with a d) ?

Tom


Le 25/08/2016 à 18:25, Crowder, Emily a écrit :
Hi Tom,


Thanks for the advice. I think the problems might be there because I upgraded 
my Ubuntu to 16.04. I tried adding it to the 'my.cnf' file, I'll copy that file 
below:


#

# The MySQL database server configuration file.

#

# You can copy this to one of:

# - "/etc/mysql/my.cnf" to set global options,

# - "~/.my.cnf" to set user-specific options.

#

# One can use all long options that the program supports.

# Run program with --help to get a list of available options and with

# --print-defaults to see which it would actually understand and use.

#

# For explanations see

# http://dev.mysql.com/doc/mysql/en/server-system-variables.html


#

# * IMPORTANT: Additional settings that can override those from this file!

#   The files must end with '.cnf', otherwise they'll be ignored.

#


!includedir /etc/mysql/conf.d/

!includedir /etc/mysql/mysql.conf.d/


sql_mode=TRADITIONAL



Is that the correct way to add it? Because when I try to do 'sudo service mysql 
start' (after stopping it) I get the following error:


Job for mysql.service failed because the control process exited with error code. See 
"systemctl status mysql.service" and "journalctl -xe" for details.



Emily



~~~~~~~~~~~~~~~~~~~~~~~~~

Emily Crowder MSc BSc
PhD Student
School of Geosciences
University of Aberdeen
Aberdeen AB24 3UE
Scotland
Em: [email protected]

~~~~~~~~~~~~~~~~~~~~~~~~~

________________________________
From: [email protected] <[email protected]> on behalf 
of Thomas Lecocq <[email protected]>
Sent: 25 August 2016 15:15:17
To: [email protected]
Subject: Re: [MSNoise] msnoise stack error

Hi Emily,

This is an issue with the latest MySQL release(s), you have to edit the
file my.cnf on your system and edit/add the sql_mode parameter:

sql_mode=TRADITIONAL


my.cnf is the general MySQL configuration file, usually located in one
of these:

   * /etc/my.cnf
   * /etc/mysql/my.cnf
   * $MYSQL_HOME/my.cnf
   * [datadir]/my.cnf
   * ~/.my.cnf

you'll need to restart mysqld after the change (sudo service mysqld restart)

HTH

Tom



Le 25/08/2016 à 16:07, Crowder, Emily a écrit :
Hello,


I have successfully run 'msnoise compute_cc' for my data so that I now have a 
file of 1 day long cross-correlations. I would now like to stack them for the 
whole time period (~2 years). However, when I try to run 'msnoise stack -r' it 
fails and I get an error message. I have pasted this below. Would you be able 
to shed some light onto it? How can I resolve this?


Thanks in advance,


Emily


root@COPS-023603-L:/home/rpgsbs/r01ec15/Documents/BASS_DATA/sorted# msnoise 
stack -r

Lets STACK !

2016-08-25 15:02:55 [DEBUG] Starting the ref stack

[]

2016-08-25 15:02:55 [DEBUG] Processing BA_BA01:BA_BA02-TT-1

Traceback (most recent call last):

    File "/root/anaconda2/bin/msnoise", line 11, in <module>

      sys.exit(run())

    File 
"/root/anaconda2/lib/python2.7/site-packages/msnoise/scripts/msnoise.py", line 
614, in run

      cli(obj={})

    File "/root/anaconda2/lib/python2.7/site-packages/click/core.py", line 716, 
in __call__

      return self.main(*args, **kwargs)

    File "/root/anaconda2/lib/python2.7/site-packages/click/core.py", line 696, 
in main

      rv = self.invoke(ctx)

    File "/root/anaconda2/lib/python2.7/site-packages/click/core.py", line 
1060, in invoke

      return _process_result(sub_ctx.command.invoke(sub_ctx))

    File "/root/anaconda2/lib/python2.7/site-packages/click/core.py", line 889, 
in invoke

      return ctx.invoke(self.callback, **ctx.params)

    File "/root/anaconda2/lib/python2.7/site-packages/click/core.py", line 534, 
in invoke

      return callback(*args, **kwargs)

    File 
"/root/anaconda2/lib/python2.7/site-packages/msnoise/scripts/msnoise.py", line 
301, in stack

      main('ref', interval)

    File "/root/anaconda2/lib/python2.7/site-packages/msnoise/s04stack.py", 
line 203, in main

      updated_days = updated_days_for_dates(db, start, end, pair.replace('_', 
'.'), jobtype='CC', interval=datetime.timedelta(days=interval),returndays=True)

    File "/root/anaconda2/lib/python2.7/site-packages/msnoise/api.py", line 
1189, in updated_days_for_dates

      days = session.query(Job).filter(Job.pair == pair).filter(Job.day >= 
date1).filter(Job.day <= date2).filter(Job.jobtype == jobtype).filter(Job.lastmod 
>= lastmod).group_by(Job.day).order_by(Job.day).all()

    File "/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/orm/query.py", 
line 2613, in all

      return list(self)

    File "/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/orm/query.py", 
line 2761, in __iter__

      return self._execute_and_instances(context)

    File "/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/orm/query.py", 
line 2776, in _execute_and_instances

      result = conn.execute(querycontext.statement, self._params)

    File 
"/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 
914, in execute

      return meth(self, multiparams, params)

    File 
"/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 
323, in _execute_on_connection

      return connection._execute_clauseelement(self, multiparams, params)

    File 
"/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 
1010, in _execute_clauseelement

      compiled_sql, distilled_params

    File 
"/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 
1146, in _execute_context

      context)

    File 
"/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 
1341, in _handle_dbapi_exception

      exc_info

    File 
"/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 
202, in raise_from_cause

      reraise(type(exception), exception, tb=exc_tb, cause=cause)

    File 
"/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 
1139, in _execute_context

      context)

    File 
"/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/default.py", 
line 450, in do_execute

      cursor.execute(statement, parameters)

    File "/root/anaconda2/lib/python2.7/site-packages/pymysql/cursors.py", line 
161, in execute

      result = self._query(query)

    File "/root/anaconda2/lib/python2.7/site-packages/pymysql/cursors.py", line 
317, in _query

      conn.query(q)

    File "/root/anaconda2/lib/python2.7/site-packages/pymysql/connections.py", 
line 837, in query

      self._affected_rows = self._read_query_result(unbuffered=unbuffered)

    File "/root/anaconda2/lib/python2.7/site-packages/pymysql/connections.py", 
line 1021, in _read_query_result

      result.read()

    File "/root/anaconda2/lib/python2.7/site-packages/pymysql/connections.py", 
line 1304, in read

      first_packet = self.connection._read_packet()

    File "/root/anaconda2/lib/python2.7/site-packages/pymysql/connections.py", 
line 983, in _read_packet

      packet.check_error()

    File "/root/anaconda2/lib/python2.7/site-packages/pymysql/connections.py", 
line 395, in check_error

      err.raise_mysql_exception(self._data)

    File "/root/anaconda2/lib/python2.7/site-packages/pymysql/err.py", line 
120, in raise_mysql_exception

      _check_mysql_exception(errinfo)

    File "/root/anaconda2/lib/python2.7/site-packages/pymysql/err.py", line 
115, in _check_mysql_exception

      raise InternalError(errno, errorvalue)

sqlalchemy.exc.InternalError: (pymysql.err.InternalError) (1055, u"Expression #1 of SELECT 
list is not in GROUP BY clause and contains nonaggregated column 'msnoise.jobs.ref' which is not 
functionally dependent on columns in GROUP BY clause; this is incompatible with 
sql_mode=only_full_group_by") [SQL: u'SELECT jobs.ref AS jobs_ref, jobs.day AS jobs_day, 
jobs.pair AS jobs_pair, jobs.jobtype AS jobs_jobtype, jobs.flag AS jobs_flag, jobs.lastmod AS 
jobs_lastmod \nFROM jobs \nWHERE jobs.pair = %(pair_1)s AND jobs.day >= %(day_1)s AND jobs.day 
<= %(day_2)s AND jobs.jobtype = %(jobtype_1)s AND jobs.lastmod >= %(lastmod_1)s GROUP BY 
jobs.day ORDER BY jobs.day'] [parameters: {u'day_2': datetime.date(2013, 4, 29), u'lastmod_1': 
datetime.datetime(2016, 8, 24, 15, 2, 55, 233936), u'day_1': datetime.date(2011, 5, 22), 
u'jobtype_1': 'CC', u'pair_1': 'BA.BA01:BA.BA02'}]


~~~~~~~~~~~~~~~~~~~~~~~~~

Emily Crowder MSc BSc
PhD Student
School of Geosciences
University of Aberdeen
Aberdeen AB24 3UE
Scotland
Em: [email protected]

~~~~~~~~~~~~~~~~~~~~~~~~~


The University of Aberdeen is a charity registered in Scotland, No SC013683.
Tha Oilthigh Obar Dheathain na charthannas clàraichte ann an Alba, Àir. 
SC013683.
_______________________________________________
MSNoise mailing list
[email protected]
http://mailman-as.oma.be/mailman/listinfo/msnoise
_______________________________________________
MSNoise mailing list
[email protected]
http://mailman-as.oma.be/mailman/listinfo/msnoise


The University of Aberdeen is a charity registered in Scotland, No SC013683.
Tha Oilthigh Obar Dheathain na charthannas clàraichte ann an Alba, Àir. 
SC013683.
_______________________________________________
MSNoise mailing list
[email protected]
http://mailman-as.oma.be/mailman/listinfo/msnoise

_______________________________________________
MSNoise mailing list
[email protected]
http://mailman-as.oma.be/mailman/listinfo/msnoise

Reply via email to