Raspberry Pi-MySQL installation linuxmysql
Yesterday is a and tomorrow is a mystery, and today is a gift.
Pre-order
MySQL on the Raspberry Pi raspberry the installation and on the Linux on the same, because the online tutorial is only a part of the description and encountered the situation, it is sorted down
Installation
- Because you do not know what the sudden execution of the operation, and then the system to execute what commands to have permission, all must add sudo to execute, this look at personal situation
- Update the Software Library
sudo apt-get update
sudo apt-get install mysql-server
Next is the installation process, would have thought the middle will prompt for password, the result is installed in one breath, think how to login Ah
- Login with a blank password
< Code data-info= "" class= "Nohighlight hljs" style= "border:0; font-size:90%; Background-color: #FFCCCC; Color: #f8f8f2; Padding-top:0.5em; Padding-right:0.5em; Padding-bottom:0.5em; Padding-left:0.5em; Overflow:visible!important; Display:block; Background: #282a36 ">sudo mysql-u root
Welcome to the MariaDB monitor. Commands end with ; or \g.Your MariaDB connection id is 6Server version: 10.1.23-MariaDB-9+deb9u1 Raspbian 9.0Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.MariaDB [(none)]>
Note : Encounter unfamiliar MariaDB, encyclopedia found is a branch of MySQL, completely inherit the usage of MySQL, so also don't worry, but this should be to see personal situation
#used in the database#connecting to a databaseUse MySQL;#Change Password to 123456, set your ownUPDATE user SET Password=password (' 123456 ') WHERE user= ' root ';#RefreshFlush privileges;#ExitExit
- Manipulating Database Services
sudo /etc/init.d/mysql status/start/stop/restart
Summarize
You need to change the password after installation, otherwise the password is empty
Raspberry Pi--MySQL installation