Other security issues with MySQL database

Source: Internet
Author: User
Tags command line ssh free ssh mysql database

The security of the database system includes many aspects. Because in many cases, the database server allows clients to connect from the network, the security of client connections has a significant impact on MySQL database security.

Do not provide a password on the client's command line

When using a client to connect to a MySQL server with MySQL, mysqladmin, and so on, you need to provide a password for the connection.

1 You can provide a password on the command line

Shell>mysql–u Root–pmypass

Note that there is no space between the-p option and the password, or you will be prompted to enter the password, and error.

You can also use the long format

Shell>mysql–user=root–password=mypass

Now you can examine the consequences of doing this:

On Unix, $ps –aux | grep MySQL

On the Win9x, you can hold down the Ctrl+alt+del key, NT you can open Task Manager.

What you find, you find that the password is clearly displayed in front of you. So don't do it anytime.

So you need to have the client prompt for your password:

Shell>mysql–u root–p

You can also use the option file to provide a password, but note that in order to be secure, you cannot store the password in the options file. You can only provide the password option, let the client prompt you to enter the password.

Using SSH to encrypt client connections

This is a note about how to use SSH to get a secure connection to a remote MySQL server (David Carlson).

Install SSH clients on your Windows machine-I use a free SSH client from http://www.doc.ic.ac.uk/~ci2/ssh/. Other Useful Links:

Http://www.npaci.edu/Security/npaci_security_software.html

Http://www.npaci.edu/Security/samples/ssh32_windows/index.html.

Start SSH. Set host name = your MySQL server name or IP address, set userid= your username to login to your server.

Click on "Local Forwords". Set local port:3306, host:localhost, remote port:3306

Save everything, or you'll have to do it again next time.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.