Guest User

Untitled

a guest
Jan 6th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.99 KB | None | 0 0
  1. root@kuroneko-Server:~# mysql -uroot -p
  2. Enter password: [Type 'itsnotpassword']
  3. Welcome to the MariaDB monitor. Commands end with ; or g.
  4. Your MariaDB connection id is 34
  5. Server version: 10.0.17-MariaDB-0ubuntu1 (Ubuntu)
  6.  
  7. Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
  8.  
  9. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
  10.  
  11. MariaDB [(none)]>
  12.  
  13. root@kuroneko-Server:~# service mysql status
  14. ● mysql.service - LSB: Start and stop the mysql database server daemon
  15. Loaded: loaded (/etc/init.d/mysql)
  16. Active: active (running) since 금 2015-05-22 11:17:41 EDT; 34min ago
  17. Docs: man:systemd-sysv-generator(8)
  18. Process: 8127 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)
  19. Process: 8158 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
  20. CGroup: /system.slice/mysql.service
  21. ├─8183 /bin/bash /usr/bin/mysqld_safe
  22. ├─8184 logger -p daemon.err -t /etc/init.d/mysql -i
  23. └─8338 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
  24.  
  25. 5월 22 11:17:40 kuroneko-Server systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
  26. 5월 22 11:17:40 kuroneko-Server mysql[8158]: * Starting MariaDB database server mysqld
  27. 5월 22 11:17:41 kuroneko-Server mysql[8158]: ...done.
  28. 5월 22 11:17:41 kuroneko-Server systemd[1]: Started LSB: Start and stop the mysql database server daemon.
  29.  
  30. [mysqld]
  31. #
  32. # * Basic Settings
  33. #
  34. user = mysql
  35. pid-file = /var/run/mysqld/mysqld.pid
  36. socket = /var/run/mysqld/mysqld.sock
  37. port = 3306
  38. basedir = /usr
  39. datadir = /var/lib/mysql
  40. tmpdir = /tmp
  41. lc-messages-dir = /usr/share/mysql
  42. skip-external-locking
  43.  
  44. # Instead of skip-networking the default is now to listen only on
  45. # localhost which is more compatible and is not less secure.
  46. bind-address = 127.0.0.1
  47.  
  48. #
  49. # * Fine Tuning
  50. #
  51. key_buffer = 16M
  52. max_allowed_packet = 16M
  53. thread_stack = 192K
  54. thread_cache_size = 8
  55. # This replaces the startup script and checks MyISAM tables if needed
  56. # the first time they are touched
  57. myisam-recover = BACKUP
  58. #max_connections = 100
  59. #table_cache = 64
  60. #thread_concurrency = 10
  61.  
  62. #
  63. # * Query Cache Configuration
  64. #
  65. query_cache_limit = 1M
  66. query_cache_size = 16M
  67.  
  68. #
  69. # * Logging and Replication
  70. #
  71. # Both location gets rotated by the cronjob.
  72. # Be aware that this log type is a performance killer.
  73. # As of 5.1 you can enable the log at runtime!
  74. #general_log_file = /var/log/mysql/mysql.log
  75. #general_log = 1
  76. #
  77. # Error log - should be very few entries.
  78. #
  79. log_error = /var/log/mysql/error.log
  80. #
  81. # Here you can see queries with especially long duration
  82. #log_slow_queries = /var/log/mysql/mysql-slow.log
  83. #long_query_time = 2
  84. #log-queries-not-using-indexes
  85. #
  86. # The following can be used as easy to replay backup logs or for replication.
  87. # note: if you are setting up a replication slave, see README.Debian about
  88. # other settings you may need to change.
  89. #server-id = 1
  90. #log_bin = /var/log/mysql/mysql-bin.log
  91. expire_logs_days = 10
  92. max_binlog_size = 100M
  93. #binlog_do_db = include_database_name
  94. #binlog_ignore_db = include_database_name
  95.  
  96. #
  97. # * InnoDB
  98. #
  99. # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
  100. # Read the manual for more InnoDB related options. There are many!
  101.  
  102. #
  103. # * Security Features
  104. #
  105. # Read the manual, too, if you want chroot!
  106. # chroot = /var/lib/mysql/
  107. #
  108. # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
  109. #
  110. # ssl-ca=/etc/mysql/cacert.pem
  111. # ssl-cert=/etc/mysql/server-cert.pem
  112. # ssl-key=/etc/mysql/server-key.pem
  113.  
  114. #
  115. # * Character sets
  116. #
  117. # Default is Latin1, if you need UTF-8 set all this (also in client section)
  118. #
  119. character-set-server = utf8
  120. collation-server = utf8_general_ci
  121. character_set_server = utf8
  122. collation_server = utf8_general_ci
  123.  
  124. #
  125. # * Unix socket authentication plugin
  126. #
  127. # Needed so the root database user can authenticate without a password but
  128. # only when running as the unix root user.
  129. #
  130. # Also available for other users if required.
  131. # See https://mariadb.com/kb/en/unix_socket-authentication-plugin/
  132. plugin-load-add = auth_socket.so
  133.  
  134. #
  135. # * Unix socket authentication plugin
  136. #
  137. # Needed so the root database user can authenticate without a password but
  138. # only when running as the unix root user.
  139. #
  140. # Also available for other users if required.
  141. # See https://mariadb.com/kb/en/unix_socket-authentication-plugin/
  142. plugin-load-add = auth_socket.so
  143.  
  144. USE mysql;
  145.  
  146. UPDATE user
  147. SET password=PASSWORD('NEW_PASSWORD'),
  148. plugin=''
  149. WHERE user='root';
  150.  
  151. FLUSH PRIVILEGES;
  152.  
  153. UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'root' AND plugin = 'unix_socket';
  154. SET PASSWORD FOR root@'localhost' = PASSWORD('yourpassword');
  155. FLUSH PRIVILEGES;
Add Comment
Please, Sign In to add comment