Mysql Learning Note 1: Installing and Logging in (multiple methods) _mysql

Source: Internet
Author: User
Tags how to use sql phpmyadmin linux mint

Start learning the database today, because I am not very cold to Microsoft, so do not use his home product originally wanted to install Oracle, but too big, look afraid for me this kind of like basics, MySQL is a good choice, about the big theory of the database I don't bother to write, I've had enough of those exams. I just need to know that people's behavior in data and files is evolving, and now using databases to better manage

Here we begin to install

I'm using Linux Mint, a distribution based on Ubuntu, and it's really good to use.

Due to the availability of the package management tool used, I will not download from the official website to install the

an order to fix :

The password is required during installation, which also omits the trouble of compiling the installation and modifying the configuration file

Besides, I am a novice, do not want to blow their enthusiasm for learning

In a word: first understand the basic concepts and methods of use, the rest of the time you need to learn

Now that you've installed it, open it to see how to log in.

Login Mode One
Copy Code code as follows:

Mysql-h 127.0.0.1-u Root-p

This is the most standard way to login, because I am installed locally, so-h parameters are 127.0.0.1, can also be written as localhost

Then-U's argument is root, which means I'm logged in as the root user

The last-p represents the password, and if you press ENTER, the next line will display enter password: Prompt for password, but not visible

Login Mode Two
Copy Code code as follows:

Mysql-h Localhost-u Root-padmin

I said it was installed locally, and I used localhost to represent the address.

You can even use the Mysql-u root-p command to omit the host address.

Attention is-padmin, where admin is my database connection password

-padmin must be connected to write, if written as-P admin is invalid

Login mode three :

Copy Code code as follows:

siu@darling ~ $ mysql

It's just as effective, at least I can do it under Linux.

Where Siu is my username, address and username omitted, the password is empty

Direct access to the user's purview under the MySQL, but not recommended I do not know

At present I know on these several types of login, can be combined to omit, try a few times you will know

As for modifying the configuration and password, frankly, I'm not.

Let's look at the information after the login

Here shows a bunch, many novice friends are subconsciously ignored, carefully look at the fact is still valuable

The first line says the way the command ends; Number, or \g to end

The second line shows you how many times you logged in, this is the 44th time I've logged in

The third line is the current version number, and here is the Ubuntu release, followed by a note

And then there's the copyright stuff.

The last line shows the help command and the way to clear the statement

Like I lost a bunch of show databasessssss \c here, enter the end of \c and press ENTER to clear the statement

Finally, there is a very good tool under Linux called phpMyAdmin

If the database operation is not skilled can try to use, but must not lazy and ignore the SQL statement learning

Like I'm just using phpMyAdmin visualization to learn how to use SQL statements

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.