Ubuntu Pastebin

Paste from jobot at Tue, 28 Jul 2015 17:26:39 +0000

Download as text
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
--database-relation-changed--

database_file=${CHARM_DIR}/files/suite.sql
if [ -s ${database_file} ]; then
  # Grab the number of this unit.
  number=${JUJU_UNIT_NAME##*/}
  # Sleep for unit number seconds to avoid two units entering at same time.
  sleep ${number}
  table_name="juju"
  # Build a query to check if the table exists inside the database.
  table_query="select count(*) from information_schema.tables where table_schema='${db_name}' and table_name='${table_name}';"
  # Use the -N to skip column names, and -s to print results tab separated.
  table_count=`mysql -N -s -u${db_user} -p${db_pass} -h ${db_host} ${db_name} -e "${table_query}"`
  if [ ${table_count} == 0 ]; then
    create_table="create table ${table_name} (dbloaded int DEFAULT 1) engine InnoDB;"
    mysql --user=${db_user} --password=${db_pass} -h ${db_host} ${db_name} -e "${create_table}"
    juju-log "The table ${table_name} did not exist, load the mysql data."
    # Ask MySQL to load the database file.
    mysql --user${db_user} --password=${db_pass} -h ${db_host} ${db_name} < ${database_file}
  else
    juju-log "The table ${table_name} already exists in ${db_name}"
  fi

--/var/log/juju-local/unti-suitecrm.log--

2015-07-28 17:02:37 INFO database-relation-changed + mysql -u aichahnoquulahb -p moohaengaavuvab -h 10.0.3.227 suitecrm -e 'UPDATE users SET user_hash = '\''$1$KMHVmrkM$FQICif5/nPsdqf8xhT.ux/'\'' WHERE user_name = '\''Admin'\'';'
2015-07-28 17:02:37 INFO database-relation-changed mysql  Ver 14.14 Distrib 5.5.44, for debian-linux-gnu (x86_64) using readline 6.3
2015-07-28 17:02:37 INFO database-relation-changed Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
2015-07-28 17:02:37 INFO database-relation-changed 
2015-07-28 17:02:37 INFO database-relation-changed Oracle is a registered trademark of Oracle Corporation and/or its
2015-07-28 17:02:37 INFO database-relation-changed affiliates. Other names may be trademarks of their respective
2015-07-28 17:02:37 INFO database-relation-changed owners.
2015-07-28 17:02:37 INFO database-relation-changed 
2015-07-28 17:02:37 INFO database-relation-changed Usage: mysql [OPTIONS] [database]
2015-07-28 17:02:37 INFO database-relation-changed   -?, --help          Display this help and exit.
2015-07-28 17:02:37 INFO database-relation-changed   -I, --help          Synonym for -?
2015-07-28 17:02:37 INFO database-relation-changed   --auto-rehash       Enable automatic rehashing. One doesn't need to use
2015-07-28 17:02:37 INFO database-relation-changed                       'rehash' to get table and field completion, but startup
2015-07-28 17:02:37 INFO database-relation-changed                       and reconnecting may take a longer time. Disable with
2015-07-28 17:02:37 INFO database-relation-changed                       --disable-auto-rehash.
2015-07-28 17:02:37 INFO database-relation-changed                       (Defaults to on; use --skip-auto-rehash to disable.)
2015-07-28 17:02:37 INFO database-relation-changed   -A, --no-auto-rehash 
2015-07-28 17:02:37 INFO database-relation-changed                       No automatic rehashing. One has to use 'rehash' to get
2015-07-28 17:02:37 INFO database-relation-changed                       table and field completion. This gives a quicker start of
2015-07-28 17:02:37 INFO database-relation-changed                       mysql and disables rehashing on reconnect.
2015-07-28 17:02:37 INFO database-relation-changed   --auto-vertical-output 
2015-07-28 17:02:37 INFO database-relation-changed                       Automatically switch to vertical output mode if the
2015-07-28 17:02:37 INFO database-relation-changed                       result is wider than the terminal width.
2015-07-28 17:02:37 INFO database-relation-changed   -B, --batch         Don't use history file. Disable interactive behavior.
2015-07-28 17:02:37 INFO database-relation-changed                       (Enables --silent.)
2015-07-28 17:02:37 INFO database-relation-changed   --character-sets-dir=name 
2015-07-28 17:02:37 INFO database-relation-changed                       Directory for character set files.
2015-07-28 17:02:37 INFO database-relation-changed   --column-type-info  Display column type information.
2015-07-28 17:02:37 INFO database-relation-changed   -c, --comments      Preserve comments. Send comments to the server. The
2015-07-28 17:02:37 INFO database-relation-changed                       default is --skip-comments (discard comments), enable
2015-07-28 17:02:37 INFO database-relation-changed                       with --comments.
2015-07-28 17:02:37 INFO database-relation-changed   -C, --compress      Use compression in server/client protocol.
2015-07-28 17:02:37 INFO database-relation-changed   -#, --debug[=#]     This is a non-debug version. Catch this and exit.
2015-07-28 17:02:37 INFO database-relation-changed   --debug-check       Check memory and open file usage at exit.
2015-07-28 17:02:37 INFO database-relation-changed   -T, --debug-info    Print some debug info at exit.
2015-07-28 17:02:37 INFO database-relation-changed   -D, --database=name Database to use.
2015-07-28 17:02:37 INFO database-relation-changed   --default-character-set=name 
2015-07-28 17:02:37 INFO database-relation-changed                       Set the default character set.
2015-07-28 17:02:37 INFO database-relation-changed   --delimiter=name    Delimiter to be used.
2015-07-28 17:02:37 INFO database-relation-changed   --enable-cleartext-plugin 
2015-07-28 17:02:37 INFO database-relation-changed                       Enable/disable the clear text authentication plugin.
2015-07-28 17:02:37 INFO database-relation-changed   -e, --execute=name  Execute command and quit. (Disables --force and history
2015-07-28 17:02:37 INFO database-relation-changed                       file.)
2015-07-28 17:02:37 INFO database-relation-changed   -E, --vertical      Print the output of a query (rows) vertically.
2015-07-28 17:02:37 INFO database-relation-changed   -f, --force         Continue even if we get an SQL error.
2015-07-28 17:02:37 INFO database-relation-changed   -G, --named-commands 
2015-07-28 17:02:37 INFO database-relation-changed                       Enable named commands. Named commands mean this program's
2015-07-28 17:02:37 INFO database-relation-changed                       internal commands; see mysql> help . When enabled, the
2015-07-28 17:02:37 INFO database-relation-changed                       named commands can be used from any line of the query,
2015-07-28 17:02:37 INFO database-relation-changed                       otherwise only from the first line, before an enter.
2015-07-28 17:02:37 INFO database-relation-changed                       Disable with --disable-named-commands. This option is
2015-07-28 17:02:37 INFO database-relation-changed                       disabled by default.
2015-07-28 17:02:37 INFO database-relation-changed   -i, --ignore-spaces Ignore space after function names.
2015-07-28 17:02:37 INFO database-relation-changed   --init-command=name SQL Command to execute when connecting to MySQL server.
2015-07-28 17:02:37 INFO database-relation-changed                       Will automatically be re-executed when reconnecting.
2015-07-28 17:02:37 INFO database-relation-changed   --local-infile      Enable/disable LOAD DATA LOCAL INFILE.
2015-07-28 17:02:37 INFO database-relation-changed   -b, --no-beep       Turn off beep on error.
2015-07-28 17:02:37 INFO database-relation-changed   -h, --host=name     Connect to host.
2015-07-28 17:02:37 INFO database-relation-changed   -H, --html          Produce HTML output.
2015-07-28 17:02:37 INFO database-relation-changed   -X, --xml           Produce XML output.
2015-07-28 17:02:37 INFO database-relation-changed   --line-numbers      Write line numbers for errors.
2015-07-28 17:02:37 INFO database-relation-changed                       (Defaults to on; use --skip-line-numbers to disable.)
2015-07-28 17:02:37 INFO database-relation-changed   -L, --skip-line-numbers 
2015-07-28 17:02:37 INFO database-relation-changed                       Don't write line number for errors.
2015-07-28 17:02:37 INFO database-relation-changed   -n, --unbuffered    Flush buffer after each query.
2015-07-28 17:02:37 INFO database-relation-changed   --column-names      Write column names in results.
2015-07-28 17:02:37 INFO database-relation-changed                       (Defaults to on; use --skip-column-names to disable.)
2015-07-28 17:02:37 INFO database-relation-changed   -N, --skip-column-names 
2015-07-28 17:02:37 INFO database-relation-changed                       Don't write column names in results.
2015-07-28 17:02:37 INFO database-relation-changed   --sigint-ignore     Ignore SIGINT (CTRL-C).
2015-07-28 17:02:37 INFO database-relation-changed   -o, --one-database  Ignore statements except those that occur while the
2015-07-28 17:02:37 INFO database-relation-changed                       default database is the one named at the command line.
2015-07-28 17:02:37 INFO database-relation-changed   --pager[=name]      Pager to use to display results. If you don't supply an
2015-07-28 17:02:37 INFO database-relation-changed                       option, the default pager is taken from your ENV variable
2015-07-28 17:02:37 INFO database-relation-changed                       PAGER. Valid pagers are less, more, cat [> filename],
2015-07-28 17:02:37 INFO database-relation-changed                       etc. See interactive help (\h) also. This option does not
2015-07-28 17:02:37 INFO database-relation-changed                       work in batch mode. Disable with --disable-pager. This
2015-07-28 17:02:37 INFO database-relation-changed                       option is disabled by default.
2015-07-28 17:02:37 INFO database-relation-changed   -p, --password[=name] 
2015-07-28 17:02:37 INFO database-relation-changed                       Password to use when connecting to server. If password is
2015-07-28 17:02:37 INFO database-relation-changed                       not given it's asked from the tty.
2015-07-28 17:02:37 INFO database-relation-changed   -P, --port=#        Port number to use for connection or 0 for default to, in
2015-07-28 17:02:37 INFO database-relation-changed                       order of preference, my.cnf, $MYSQL_TCP_PORT,
2015-07-28 17:02:37 INFO database-relation-changed                       /etc/services, built-in default (3306).
2015-07-28 17:02:37 INFO database-relation-changed   --prompt=name       Set the mysql prompt to this value.
2015-07-28 17:02:37 INFO database-relation-changed   --protocol=name     The protocol to use for connection (tcp, socket, pipe,
2015-07-28 17:02:37 INFO database-relation-changed                       memory).
2015-07-28 17:02:37 INFO database-relation-changed   -q, --quick         Don't cache result, print it row by row. This may slow
2015-07-28 17:02:37 INFO database-relation-changed                       down the server if the output is suspended. Doesn't use
2015-07-28 17:02:37 INFO database-relation-changed                       history file.
2015-07-28 17:02:37 INFO database-relation-changed   -r, --raw           Write fields without conversion. Used with --batch.
2015-07-28 17:02:37 INFO database-relation-changed   --reconnect         Reconnect if the connection is lost. Disable with
2015-07-28 17:02:37 INFO database-relation-changed                       --disable-reconnect. This option is enabled by default.
2015-07-28 17:02:37 INFO database-relation-changed                       (Defaults to on; use --skip-reconnect to disable.)
2015-07-28 17:02:37 INFO database-relation-changed   -s, --silent        Be more silent. Print results with a tab as separator,
2015-07-28 17:02:37 INFO database-relation-changed                       each row on new line.
2015-07-28 17:02:37 INFO database-relation-changed   -S, --socket=name   The socket file to use for connection.
2015-07-28 17:02:37 INFO database-relation-changed   --ssl               Enable SSL for connection (automatically enabled with
2015-07-28 17:02:37 INFO database-relation-changed                       other flags).
2015-07-28 17:02:37 INFO database-relation-changed   --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies
2015-07-28 17:02:37 INFO database-relation-changed                       --ssl).
2015-07-28 17:02:37 INFO database-relation-changed   --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).
2015-07-28 17:02:37 INFO database-relation-changed   --ssl-cert=name     X509 cert in PEM format (implies --ssl).
2015-07-28 17:02:37 INFO database-relation-changed   --ssl-cipher=name   SSL cipher to use (implies --ssl).
2015-07-28 17:02:37 INFO database-relation-changed   --ssl-key=name      X509 key in PEM format (implies --ssl).
2015-07-28 17:02:37 INFO database-relation-changed   --ssl-verify-server-cert 
2015-07-28 17:02:37 INFO database-relation-changed                       Verify server's "Common Name" in its cert against
2015-07-28 17:02:37 INFO database-relation-changed                       hostname used when connecting. This option is disabled by
2015-07-28 17:02:37 INFO database-relation-changed                       default.
2015-07-28 17:02:37 INFO database-relation-changed   -t, --table         Output in table format.
2015-07-28 17:02:37 INFO database-relation-changed   --tee=name          Append everything into outfile. See interactive help (\h)
2015-07-28 17:02:37 INFO database-relation-changed                       also. Does not work in batch mode. Disable with
2015-07-28 17:02:37 INFO database-relation-changed                       --disable-tee. This option is disabled by default.
2015-07-28 17:02:37 INFO database-relation-changed   -u, --user=name     User for login if not current user.
2015-07-28 17:02:37 INFO database-relation-changed   -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.
2015-07-28 17:02:37 INFO database-relation-changed   -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.
2015-07-28 17:02:37 INFO database-relation-changed   -v, --verbose       Write more. (-v -v -v gives the table output format).
2015-07-28 17:02:37 INFO database-relation-changed   -V, --version       Output version information and exit.
2015-07-28 17:02:37 INFO database-relation-changed   -w, --wait          Wait and retry if connection is down.
2015-07-28 17:02:37 INFO database-relation-changed   --connect-timeout=# Number of seconds before connection timeout.
2015-07-28 17:02:37 INFO database-relation-changed   --max-allowed-packet=# 
2015-07-28 17:02:37 INFO database-relation-changed                       The maximum packet length to send to or receive from
2015-07-28 17:02:37 INFO database-relation-changed                       server.
2015-07-28 17:02:37 INFO database-relation-changed   --net-buffer-length=# 
2015-07-28 17:02:37 INFO database-relation-changed                       The buffer size for TCP/IP and socket communication.
2015-07-28 17:02:37 INFO database-relation-changed   --select-limit=#    Automatic limit for SELECT when using --safe-updates.
2015-07-28 17:02:37 INFO database-relation-changed   --max-join-size=#   Automatic limit for rows in a join when using
2015-07-28 17:02:37 INFO database-relation-changed                       --safe-updates.
2015-07-28 17:02:37 INFO database-relation-changed   --secure-auth       Refuse client connecting to server if it uses old
2015-07-28 17:02:37 INFO database-relation-changed                       (pre-4.1.1) protocol.
2015-07-28 17:02:37 INFO database-relation-changed   --server-arg=name   Send embedded server this as a parameter.
2015-07-28 17:02:37 INFO database-relation-changed   --show-warnings     Show warnings after every statement.
2015-07-28 17:02:37 INFO database-relation-changed   --plugin-dir=name   Directory for client-side plugins.
2015-07-28 17:02:37 INFO database-relation-changed   --default-auth=name Default authentication client-side plugin to use.
2015-07-28 17:02:37 INFO database-relation-changed 
2015-07-28 17:02:37 INFO database-relation-changed Default options are read from the following files in the given order:
2015-07-28 17:02:37 INFO database-relation-changed /etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf 
2015-07-28 17:02:37 INFO database-relation-changed The following groups are read: mysql client
2015-07-28 17:02:37 INFO database-relation-changed The following options may be given as the first argument:
2015-07-28 17:02:37 INFO database-relation-changed --print-defaults        Print the program argument list and exit.
2015-07-28 17:02:37 INFO database-relation-changed --no-defaults           Don't read default options from any option file.
2015-07-28 17:02:37 INFO database-relation-changed --defaults-file=#       Only read default options from the given file #.
2015-07-28 17:02:37 INFO database-relation-changed --defaults-extra-file=# Read this file after the global files are read.
2015-07-28 17:02:37 INFO database-relation-changed 
2015-07-28 17:02:37 INFO database-relation-changed Variables (--variable-name=value)
2015-07-28 17:02:37 INFO database-relation-changed and boolean options {FALSE|TRUE}  Value (after reading options)
2015-07-28 17:02:37 INFO database-relation-changed --------------------------------- ----------------------------------------
2015-07-28 17:02:37 INFO database-relation-changed auto-rehash                       TRUE
2015-07-28 17:02:37 INFO database-relation-changed auto-vertical-output              FALSE
2015-07-28 17:02:37 INFO database-relation-changed character-sets-dir                (No default value)
2015-07-28 17:02:37 INFO database-relation-changed column-type-info                  FALSE
2015-07-28 17:02:37 INFO database-relation-changed comments                          FALSE
2015-07-28 17:02:37 INFO database-relation-changed compress                          FALSE
2015-07-28 17:02:37 INFO database-relation-changed debug-check                       FALSE
2015-07-28 17:02:37 INFO database-relation-changed debug-info                        FALSE
2015-07-28 17:02:37 INFO database-relation-changed database                          (No default value)
2015-07-28 17:02:37 INFO database-relation-changed default-character-set             auto
2015-07-28 17:02:37 INFO database-relation-changed delimiter                         ;
2015-07-28 17:02:37 INFO database-relation-changed enable-cleartext-plugin           FALSE
2015-07-28 17:02:37 INFO database-relation-changed vertical                          FALSE
2015-07-28 17:02:37 INFO database-relation-changed force                             FALSE
2015-07-28 17:02:37 INFO database-relation-changed named-commands                    FALSE
2015-07-28 17:02:37 INFO database-relation-changed ignore-spaces                     FALSE
2015-07-28 17:02:37 INFO database-relation-changed init-command                      (No default value)
2015-07-28 17:02:37 INFO database-relation-changed local-infile                      FALSE
2015-07-28 17:02:37 INFO database-relation-changed no-beep                           FALSE
2015-07-28 17:02:37 INFO database-relation-changed host                              10.0.3.227
2015-07-28 17:02:37 INFO database-relation-changed html                              FALSE
2015-07-28 17:02:37 INFO database-relation-changed xml                               FALSE
2015-07-28 17:02:37 INFO database-relation-changed line-numbers                      TRUE
2015-07-28 17:02:37 INFO database-relation-changed unbuffered                        FALSE
2015-07-28 17:02:37 INFO database-relation-changed column-names                      TRUE
2015-07-28 17:02:37 INFO database-relation-changed sigint-ignore                     FALSE
2015-07-28 17:02:37 INFO database-relation-changed port                              3306
2015-07-28 17:02:37 INFO database-relation-changed prompt                            mysql> 
2015-07-28 17:02:37 INFO database-relation-changed quick                             FALSE
2015-07-28 17:02:37 INFO database-relation-changed raw                               FALSE
2015-07-28 17:02:37 INFO database-relation-changed reconnect                         FALSE
2015-07-28 17:02:37 INFO database-relation-changed socket                            /var/run/mysqld/mysqld.sock
2015-07-28 17:02:37 INFO database-relation-changed ssl                               FALSE
2015-07-28 17:02:37 INFO database-relation-changed ssl-ca                            (No default value)
2015-07-28 17:02:37 INFO database-relation-changed ssl-capath                        (No default value)
2015-07-28 17:02:37 INFO database-relation-changed ssl-cert                          (No default value)
2015-07-28 17:02:37 INFO database-relation-changed ssl-cipher                        (No default value)
2015-07-28 17:02:37 INFO database-relation-changed ssl-key                           (No default value)
2015-07-28 17:02:37 INFO database-relation-changed ssl-verify-server-cert            FALSE
2015-07-28 17:02:37 INFO database-relation-changed table                             FALSE
2015-07-28 17:02:37 INFO database-relation-changed user                              aichahnoquulahb
2015-07-28 17:02:37 INFO database-relation-changed safe-updates                      FALSE
2015-07-28 17:02:37 INFO database-relation-changed i-am-a-dummy                      FALSE
2015-07-28 17:02:37 INFO database-relation-changed connect-timeout                   0
2015-07-28 17:02:37 INFO database-relation-changed max-allowed-packet                16777216
2015-07-28 17:02:37 INFO database-relation-changed net-buffer-length                 16384
2015-07-28 17:02:37 INFO database-relation-changed select-limit                      1000
2015-07-28 17:02:37 INFO database-relation-changed max-join-size                     1000000
2015-07-28 17:02:37 INFO database-relation-changed secure-auth                       FALSE
2015-07-28 17:02:37 INFO database-relation-changed show-warnings                     FALSE
2015-07-28 17:02:37 INFO database-relation-changed plugin-dir                        (No default value)
2015-07-28 17:02:37 INFO database-relation-changed default-auth                      (No default value)
2015-07-28 17:02:37 ERROR juju.worker.uniter.operation runhook.go:103 hook "database-relation-changed" failed: exit status 1






































































































































































03
Download as text