First I want to enable root user, so I first enable root user:
Su dopasswd root
You will be prompted to enter the password two times, and then:
Su dopasswd--unlock root
This allows you to start the root login and if you want to use root immediately, you can:
Su Root
This allows you to switch directly to the root user, but will prompt for a password, if the next time you log in with root, you will be logged in the Display Settings screen, if you just play, you can not control this.
Next, to install MySQL, you can first update the following software before installing:
Su doapt-update
And then it's waiting. After the wait is ready to install MySQL, the command to install directly:
Su doapt-get install mysql-server
Then wait, during the installation will prompt you to enter the root password of MySQL, will be prompted two times. After the input is complete, it will be installed successfully.
Then enter the following command to enter MySQL:
Mysql-u root-p
You will then be prompted to enter your password and enter your password to enter MySQL:
1 root@raspberrypi:/home/pi# mysql-u Root-p2EnterPassword3Welcome to theMySQL Monitor.CommandsEnd with;or \g.4YourMySQL Connection ID is435ServerVersion5.5.35-0+wheezy1 (Debian)67Copyright (c)2000,2013,Oracleand/or its affiliates.all rights reserved. 8 9 oracle is a registered trademark of oracle corporation and/or its10 affiliates. other names may be trademarks of their Respective11 Owners.12 13 type HELP; ' span class= "keyword" >or ' \h ' for help. type " \c ' to clear the current input Statement. 15 mysql>
Raspberry Pi installation MySQL