MariaDB

From ThinkServer
Revision as of 01:40, 29 February 2012 by >Samthecrazyman (Removed redundant code tags)

MySQL is the default database used by much of the Linux system. It is maintained by Oracle Corporation (originally Sun Microsystems) and is licensed under the GNU GPL v2 license.

Examples of programs using this include:

  • Amarok music player
  • Akonadi PIM subsystem (KDE)
  • MediaWiki
  • Many other content management systems

Setting up MySQL for first use

You will need to set the root password. This is like the root account on Linux, it allows full control over MySQL. Make sure this password is kept secure at all times. Many of the programs that require the MySQL database will require root access initially to make the tables they require.

Chaning the root password

  1. Open Konsole
  2. At the command prompt, type:
# mysqladmin -u root password newpassword

For example, if you wanted to change your password to computer, type:

# mysqladmin -u root password computer
  1. Remember, you password is in plain sight on the command prompt. Make sure no one sees you typing and clear the screen afterwards by typing at the prompt:
# clear

You may also want to clear your scrollback. This can be done in the 'Tools' menu of Konsole.

  1. Test your new password by logging into MySQL. Type at the prompt:
# mysql -u root -p
  1. Type your password when asked.
  2. If you've logged in OK, exit by typing:
mysql> exit;

(Don't forget the ;). MySQL will respond with 'Bye' if you have correctly exited and return you to the prompt.

  1. If your stuck and MySQL is returning -> at any time, you have forgotten the ; at the end of the command. Type the command with a ;. This will display an error message. Type the command again with the ; and the command will work

External

MySQL website