Skip to main content

MySQL and MariaDB

  • Chapter
  • First Online:
  • 2589 Accesses

Abstract

MySQL is a commonly used open source relational database that is used in conjunction with web applications like WordPress and Joomla. The company that developed MySQL was acquired by Oracle, and many of the original developers of MySQL became concerned for the future licensing of MySQL. In 2009, they created a fork of MySQL, named MariaDB, which serves as a replacement for the same version of MySQL.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    Some versions of MySQL (e.g., MySQL 5.7.20) require the Visual C++ Redistributable Packages for Visual Studio 2013 from Microsoft. If this is the case, attempts to run mysqld will fail with an error stating that msvcr120.dll is missing. The redistributable can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=40784 . See also the Notes and References section of Chapter 20.

  2. 2.

    The service installation step will indicate success even if the previous steps were not followed. However, though the service will be present, attempts to start the service will fail. To verify the configuration is ready for service installation, an administrator can run mysqld –-console from an administrator command prompt and verify that it is able to start without error before setting up the service.

  3. 3.

    The ALTER USER command is discussed in more detail later in the chapter.

  4. 4.

    The statement is ended with \G to display the results vertically.

  5. 5.

    https://mariadb.com/kb/en/library/authentication-plugin-unix-socket/

  6. 6.

    Please don’t do this.

  7. 7.

    https://dev.mysql.com/doc/refman/5.7/en/set-password.html

  8. 8.

    Modern here means MySQL ≥ 4.1.

  9. 9.

    See, e.g., http://dev.mysql.com/doc/refman/5.6/en/string-functions.html#function_unhex

  10. 10.

    See, e.g.. https://dev.mysql.com/doc/refman/5.7/en/information-functions.html , https://mariadb.com/kb/en/library/current_user/ , or https://mariadb.com/kb/en/library/user/

  11. 11.

    See, e.g., https://dev.mysql.com/doc/refman/5.5/en/mysqld-safe.html .

  12. 12.

    The location of the directive varies with the version. The directive may be in /etc/mysql/my.cnf, or /etc/mysql/mysql.conf.d/mysqld.cnf, or /etc/mysql/mariadb.conf/50-server.cnf.

  13. 13.

    https://dev.mysql.com/doc/refman/5.6/en/mysql-logging.html

  14. 14.

    The file /usr/share/wordlists/metasploit/password.lst contains non-ASCII characters that can cause the script to fail. One approach is to convert the file to ASCII characters with the command cat password.lst | iconv -f ISO-8859-1 -t ASCII//TRANSLIT > password_ascii.lst. It also does not contain the default password used in these examples (password1!), so this has been appended to the list.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Mike O'Leary

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

O’Leary, M. (2019). MySQL and MariaDB. In: Cyber Operations. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4294-0_18

Download citation

Publish with us

Policies and ethics