Advertisement
Guest User

Untitled

a guest
Apr 21st, 2013
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.43 KB | None | 0 0
  1. root@dislexia:~# exit
  2. dislexia@dislexia:~$
  3. dislexia@dislexia:~$ sudo -s
  4. Password:
  5. root@dislexia:~# mysql -p
  6. Enter password:
  7. Welcome to the MySQL monitor. Commands end with ; or \g.
  8. Your MySQL connection id is 194
  9. Server version: 5.5.29-0ubuntu0.12.04.2 (Ubuntu)
  10.  
  11. Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  12.  
  13. Oracle is a registered trademark of Oracle Corporation and/or its
  14. affiliates. Other names may be trademarks of their respective
  15. owners.
  16.  
  17. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  18.  
  19. mysql> select user ();
  20. +----------------+
  21. | user () |
  22. +----------------+
  23. | root@localhost |
  24. +----------------+
  25. 1 row in set (0.00 sec)
  26.  
  27. mysql> select user, host from mysql, user order by use, host;
  28. ERROR 1046 (3D000): No database selected
  29. mysql> select user,host from mysql,user order by use,host ;
  30. ERROR 1046 (3D000): No database selected
  31. mysql> show grants for wordpress@localhost;
  32. +------------------------------------------------------------------------------------------------------------------+
  33. | Grants for wordpress@localhost |
  34. +------------------------------------------------------------------------------------------------------------------+
  35. | GRANT USAGE ON *.* TO 'wordpress'@'localhost' IDENTIFIED BY PASSWORD '*xxxxxxxxxxxxxxxxx' |
  36. | GRANT ALL PRIVILEGES ON `wordpress`.* TO 'wordpress'@'localhost' |
  37. +------------------------------------------------------------------------------------------------------------------+
  38. 2 rows in set (0.00 sec)
  39.  
  40. mysql> show database;
  41. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'database' at line 1
  42. mysql> use wordpress; show tables;
  43. Reading table information for completion of table and column names
  44. You can turn off this feature to get a quicker startup with -A
  45.  
  46. Database changed
  47. +-----------------------+
  48. | Tables_in_wordpress |
  49. +-----------------------+
  50. | wp_commentmeta |
  51. | wp_comments |
  52. | wp_links |
  53. | wp_options |
  54. | wp_postmeta |
  55. | wp_posts |
  56. | wp_term_relationships |
  57. | wp_term_taxonomy |
  58. | wp_terms |
  59. | wp_usermeta |
  60. | wp_users |
  61. +-----------------------+
  62. 11 rows in set (0.00 sec)
  63.  
  64. mysql> drop user wordpress@localhost;
  65. Query OK, 0 rows affected (0.25 sec)
  66.  
  67. mysql> grant all privileges on wordpress. * to wordpress@localhost identified by "moj pasword";
  68. Query OK, 0 rows affected (0.00 sec)
  69.  
  70. mysql> exit
  71. Bye
  72. root@dislexia:~# exit
  73. dislexia@dislexia:~$ mysql -u wordpress - p
  74. mysql Ver 14.14 Distrib 5.5.29, for debian-linux-gnu (i686) using readline 6.2
  75. Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  76.  
  77. Oracle is a registered trademark of Oracle Corporation and/or its
  78. affiliates. Other names may be trademarks of their respective
  79. owners.
  80.  
  81. Usage: mysql [OPTIONS] [database]
  82. -?, --help Display this help and exit.
  83. -I, --help Synonym for -?
  84. --auto-rehash Enable automatic rehashing. One doesn't need to use
  85. 'rehash' to get table and field completion, but startup
  86. and reconnecting may take a longer time. Disable with
  87. --disable-auto-rehash.
  88. (Defaults to on; use --skip-auto-rehash to disable.)
  89. -A, --no-auto-rehash
  90. No automatic rehashing. One has to use 'rehash' to get
  91. table and field completion. This gives a quicker start of
  92. mysql and disables rehashing on reconnect.
  93. --auto-vertical-output
  94. Automatically switch to vertical output mode if the
  95. result is wider than the terminal width.
  96. -B, --batch Don't use history file. Disable interactive behavior.
  97. (Enables --silent.)
  98. --character-sets-dir=name
  99. Directory for character set files.
  100. --column-type-info Display column type information.
  101. -c, --comments Preserve comments. Send comments to the server. The
  102. default is --skip-comments (discard comments), enable
  103. with --comments.
  104. -C, --compress Use compression in server/client protocol.
  105. -#, --debug[=#] This is a non-debug version. Catch this and exit.
  106. --debug-check Check memory and open file usage at exit.
  107. -T, --debug-info Print some debug info at exit.
  108. -D, --database=name Database to use.
  109. --default-character-set=name
  110. Set the default character set.
  111. --delimiter=name Delimiter to be used.
  112. --enable-cleartext-plugin
  113. Enable/disable the clear text authentication plugin.
  114. -e, --execute=name Execute command and quit. (Disables --force and history
  115. file.)
  116. -E, --vertical Print the output of a query (rows) vertically.
  117. -f, --force Continue even if we get an SQL error.
  118. -G, --named-commands
  119. Enable named commands. Named commands mean this program's
  120. internal commands; see mysql> help . When enabled, the
  121. named commands can be used from any line of the query,
  122. otherwise only from the first line, before an enter.
  123. Disable with --disable-named-commands. This option is
  124. disabled by default.
  125. -i, --ignore-spaces Ignore space after function names.
  126. --init-command=name SQL Command to execute when connecting to MySQL server.
  127. Will automatically be re-executed when reconnecting.
  128. --local-infile Enable/disable LOAD DATA LOCAL INFILE.
  129. -b, --no-beep Turn off beep on error.
  130. -h, --host=name Connect to host.
  131. -H, --html Produce HTML output.
  132. -X, --xml Produce XML output.
  133. --line-numbers Write line numbers for errors.
  134. (Defaults to on; use --skip-line-numbers to disable.)
  135. -L, --skip-line-numbers
  136. Don't write line number for errors.
  137. -n, --unbuffered Flush buffer after each query.
  138. --column-names Write column names in results.
  139. (Defaults to on; use --skip-column-names to disable.)
  140. -N, --skip-column-names
  141. Don't write column names in results.
  142. --sigint-ignore Ignore SIGINT (CTRL-C).
  143. -o, --one-database Ignore statements except those that occur while the
  144. default database is the one named at the command line.
  145. --pager[=name] Pager to use to display results. If you don't supply an
  146. option, the default pager is taken from your ENV variable
  147. PAGER. Valid pagers are less, more, cat [> filename],
  148. etc. See interactive help (\h) also. This option does not
  149. work in batch mode. Disable with --disable-pager. This
  150. option is disabled by default.
  151. -p, --password[=name]
  152. Password to use when connecting to server. If password is
  153. not given it's asked from the tty.
  154. -P, --port=# Port number to use for connection or 0 for default to, in
  155. order of preference, my.cnf, $MYSQL_TCP_PORT,
  156. /etc/services, built-in default (3306).
  157. --prompt=name Set the mysql prompt to this value.
  158. --protocol=name The protocol to use for connection (tcp, socket, pipe,
  159. memory).
  160. -q, --quick Don't cache result, print it row by row. This may slow
  161. down the server if the output is suspended. Doesn't use
  162. history file.
  163. -r, --raw Write fields without conversion. Used with --batch.
  164. --reconnect Reconnect if the connection is lost. Disable with
  165. --disable-reconnect. This option is enabled by default.
  166. (Defaults to on; use --skip-reconnect to disable.)
  167. -s, --silent Be more silent. Print results with a tab as separator,
  168. each row on new line.
  169. -S, --socket=name The socket file to use for connection.
  170. --ssl Enable SSL for connection (automatically enabled with
  171. other flags).
  172. --ssl-ca=name CA file in PEM format (check OpenSSL docs, implies
  173. --ssl).
  174. --ssl-capath=name CA directory (check OpenSSL docs, implies --ssl).
  175. --ssl-cert=name X509 cert in PEM format (implies --ssl).
  176. --ssl-cipher=name SSL cipher to use (implies --ssl).
  177. --ssl-key=name X509 key in PEM format (implies --ssl).
  178. --ssl-verify-server-cert
  179. Verify server's "Common Name" in its cert against
  180. hostname used when connecting. This option is disabled by
  181. default.
  182. -t, --table Output in table format.
  183. --tee=name Append everything into outfile. See interactive help (\h)
  184. also. Does not work in batch mode. Disable with
  185. --disable-tee. This option is disabled by default.
  186. -u, --user=name User for login if not current user.
  187. -U, --safe-updates Only allow UPDATE and DELETE that uses keys.
  188. -U, --i-am-a-dummy Synonym for option --safe-updates, -U.
  189. -v, --verbose Write more. (-v -v -v gives the table output format).
  190. -V, --version Output version information and exit.
  191. -w, --wait Wait and retry if connection is down.
  192. --connect-timeout=# Number of seconds before connection timeout.
  193. --max-allowed-packet=#
  194. The maximum packet length to send to or receive from
  195. server.
  196. --net-buffer-length=#
  197. The buffer size for TCP/IP and socket communication.
  198. --select-limit=# Automatic limit for SELECT when using --safe-updates.
  199. --max-join-size=# Automatic limit for rows in a join when using
  200. --safe-updates.
  201. --secure-auth Refuse client connecting to server if it uses old
  202. (pre-4.1.1) protocol.
  203. --server-arg=name Send embedded server this as a parameter.
  204. --show-warnings Show warnings after every statement.
  205. --plugin-dir=name Directory for client-side plugins.
  206. --default-auth=name Default authentication client-side plugin to use.
  207.  
  208. Default options are read from the following files in the given order:
  209. /etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf
  210. The following groups are read: mysql client
  211. The following options may be given as the first argument:
  212. --print-defaults Print the program argument list and exit.
  213. --no-defaults Don't read default options from any option file.
  214. --defaults-file=# Only read default options from the given file #.
  215. --defaults-extra-file=# Read this file after the global files are read.
  216.  
  217. Variables (--variable-name=value)
  218. and boolean options {FALSE|TRUE} Value (after reading options)
  219. --------------------------------- ----------------------------------------
  220. auto-rehash TRUE
  221. auto-vertical-output FALSE
  222. character-sets-dir (No default value)
  223. column-type-info FALSE
  224. comments FALSE
  225. compress FALSE
  226. debug-check FALSE
  227. debug-info FALSE
  228. database (No default value)
  229. default-character-set auto
  230. delimiter ;
  231. enable-cleartext-plugin FALSE
  232. vertical FALSE
  233. force FALSE
  234. named-commands FALSE
  235. ignore-spaces FALSE
  236. init-command (No default value)
  237. local-infile FALSE
  238. no-beep FALSE
  239. host (No default value)
  240. html FALSE
  241. xml FALSE
  242. line-numbers TRUE
  243. unbuffered FALSE
  244. column-names TRUE
  245. sigint-ignore FALSE
  246. port 3306
  247. prompt mysql>
  248. quick FALSE
  249. raw FALSE
  250. reconnect TRUE
  251. socket /var/run/mysqld/mysqld.sock
  252. ssl FALSE
  253. ssl-ca (No default value)
  254. ssl-capath (No default value)
  255. ssl-cert (No default value)
  256. ssl-cipher (No default value)
  257. ssl-key (No default value)
  258. ssl-verify-server-cert FALSE
  259. table FALSE
  260. user wordpress
  261. safe-updates FALSE
  262. i-am-a-dummy FALSE
  263. connect-timeout 0
  264. max-allowed-packet 16777216
  265. net-buffer-length 16384
  266. select-limit 1000
  267. max-join-size 1000000
  268. secure-auth FALSE
  269. show-warnings FALSE
  270. plugin-dir (No default value)
  271. default-auth (No default value)
  272. dislexia@dislexia:~$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement