How to install MySQL Server 5.7 on Deepin


Photo by panumas nikhomkhai from Pexels
This Guide Will Introduce How to Install and Configure MySQL Server 5.7 on your Deepin Linux.
1. Update System

Open deepin terminal(ctrl+alt+T) and type these commands to update the deepin system. Enter user password if required.

$ sudo apt-get update && sudo apt-get upgrade



2.Install MySQL Server 5.7

Type following command to install MySQL server 5.7. (Enter y to continue installation)

$ sudo apt-get install mysql-server-5.7


3. Change User Authentication and Privileges

In Debian ѕуѕtеmѕ runnіng MySQL 5.7 (and later vеrѕіоnѕ) the rооt MуSQL user іѕ to аuthеntісаtе uѕіng thе auth_socket рlugіn bу default rаthеr thаn with a раѕѕwоrd.
Tо соnnесt MуSQL аѕ root, you have tо switch its аuthеntісаtіоn mеthоd frоm auth_socket tо mysql_native_password.

To do this, Open the deepin terminal and enter the following commands.

Note:- Replace  'password'   with your password.

$ sudo mysql -u root

mysql> USE mysql;
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
mysql> FLUSH PRIVILEGES;
mysql> exit;

$ sudo service mysql restart




4. Configure MySQL Server 5.7 (Optional)

Here you will be given a choice to set or change MySQL password for the root user, Validate password plugin, remove anonymous user accounts, disable root logins outside of localhost, and remove test databases.

Enter the following command to configure MySQL Server 5.7

$ mysql_secure_installation  

The result will look like this.

debuggerme@debuggerme-PC:~$ mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root: 

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No: n
Using existing password for root.
Change the password for root ? ((Press y|Y for Yes, any other key for No) : n

 ... skipping.
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y
Success.


Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y
Success.

By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.


Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y
 - Dropping test database...
Success.

 - Removing privileges on test database...
Success.

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y
Success.

All done! 


5. Test MySQL Server 

So you have successfully installed and configured MySQL Server 5.7. Now you can log in to MySQL Server and start coding.

$ mysql -h localhost -u root -p    # h - host , u - user , p - password

COMMENTS

Name

Linux,3,Programming,3,Tips & Tricks,6,
ltr
item
DebuggerMe: How to install MySQL Server 5.7 on Deepin
How to install MySQL Server 5.7 on Deepin
How to Install, Configure And Manage MySQL Server 5.7 on your Deepin Linux.
https://1.bp.blogspot.com/-3XUaRfT-Kl8/Xnx_4QBBlHI/AAAAAAAAYJk/YHjkwxaH1ZMG0QCxCiFJKVQJ-N3aHfkBACLcBGAsYHQ/s640/install-mysql-deepin.png
https://1.bp.blogspot.com/-3XUaRfT-Kl8/Xnx_4QBBlHI/AAAAAAAAYJk/YHjkwxaH1ZMG0QCxCiFJKVQJ-N3aHfkBACLcBGAsYHQ/s72-c/install-mysql-deepin.png
DebuggerMe
https://www.debuggerme.com/2019/01/how-to-install-mysql-server-57-on-deepin.html
https://www.debuggerme.com/
https://www.debuggerme.com/
https://www.debuggerme.com/2019/01/how-to-install-mysql-server-57-on-deepin.html
true
3101717173497195494
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy