MariaDB: Difference between revisions
>Samthecrazyman m Removed redundant code tags |
>Samthecrazyman m Readded pre tags due to number lists failing |
||
Line 15: | Line 15: | ||
# Open Konsole | # Open Konsole | ||
# At the command prompt, type: | # At the command prompt, type: <pre># mysqladmin -u root password newpassword</pre> For example, if you wanted to change your password to computer, type: <pre># mysqladmin -u root password computer</pre> | ||
# 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: <pre># clear</pre> You may also want to clear your scrollback. This can be done in the 'Tools' menu of Konsole. | |||
For example, if you wanted to change your password to computer, type: | # Test your new password by logging into MySQL. Type at the prompt: <pre># mysql -u root -p</pre> | ||
# 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: | |||
You may also want to clear your scrollback. This can be done in the 'Tools' menu of Konsole. | |||
# Test your new password by logging into MySQL. Type at the prompt: | |||
# Type your password when asked. | # Type your password when asked. | ||
# If you've logged in OK, exit by typing: | # If you've logged in OK, exit by typing: <pre>mysql> exit;</pre>(Don't forget the ;). MySQL will respond with 'Bye' if you have correctly exited and return you to the prompt. | ||
(Don't forget the ;). MySQL will respond with 'Bye' if you have correctly exited and return you to the prompt. | |||
# If your stuck and MySQL is returning <code>-></code> 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 | # If your stuck and MySQL is returning <code>-></code> 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 | ||
Revision as of 01:44, 29 February 2012
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
- Open Konsole
- 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
- 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. - Test your new password by logging into MySQL. Type at the prompt:
# mysql -u root -p
- Type your password when asked.
- 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. - 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