Install MySQL under Ubuntu14.04

Source: Internet
Author: User
Tags mysql login
I installed MySQL in Ubuntu14.04 today. I used to download the installation package from the official website, but it cannot be used after installation. I guess it is necessary to configure it. I found a lot of information on the Internet, the result is still failed. Therefore, you have to install it in the software source, which saves a lot of unnecessary trouble. Www.linuxidc.com @ linuxidc :~ $ Sudoapt-getinstallmysql-server [sudo] passwordforlinuxidc:

I installed MySQL in Ubuntu 14.04 today. I used to download the installation package from the official website, but it was not available after installation. I guess it is necessary to configure it. I found a lot of information on the Internet, the result is still failed. Therefore, you have to install it in the software source, which saves a lot of unnecessary trouble.

Www.linuxidc.com @ linuxidc :~ $ Sudo apt-get install mysql-server
[Sudo] password for linuxidc:

After executing this command, the system will automatically install other software. During the installation process, the system will prompt you to enter the mysql login password.

Use the Tab key to select OK

You need to enter the password twice. I will enter v here for testing. Easy to use. Remember, it will be used later.
 
If the system version is different, the prompt method may be different, but it is similar in general. After installation, execute the command

Www.linuxidc.com @ linuxidc :~ $ Mysql
ERROR 1045 (28000): Access denied for user 'linuxid' @ 'localhost' (using password: NO)
Www.linuxidc.com @ linuxidc :~ $

The result was wrong. After Google for half a day, the result became increasingly impatient. At this time, I flipped through my own books and entered the following command.

Www.linuxidc.com @ linuxidc :~ $ Mysql-uroot-pv

The first mysql is the command,-uroot is the designated user as root,-pv is the input login password, v is the password, if you set the password is another, replace it with the password you set during installation. Remember that there is no space between the password and-p, otherwise it will fail. The following shows how to view all existing databases after I log on successfully.

Linuxidc @ ubuntu :~ $ Mysql-uroot-pv
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 44
Server version: 5.5.37-0ubuntu0. 14.04.1 (Ubuntu)

Copyright (c) 2000,201 4, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be trademarks of their respective
Owners.

Type 'help; 'or' \ H' for help. type' \ C' to clear the current input statement.

Mysql>

MySQL authoritative guide (original book version 2nd) Clear Chinese scanning version PDF http://www.linuxidc.com/Linux/2014-03/98821.htm

Ubuntu 14.04 LTS install LNMP Nginx \ PHP5 (PHP-FPM) \ MySQL http://www.linuxidc.com/Linux/2014-05/102351.htm

Build a MySQL Master/Slave server http://www.linuxidc.com/Linux/2014-05/101599.htm in Ubuntu 14.04

Ubuntu 12.04 LTS build highly available distributed MySQL cluster http://www.linuxidc.com/Linux/2013-11/93019.htm

Install MySQL5.6 and Python-MySQLdb http://www.linuxidc.com/Linux/2013-08/89270.htm in Ubuntu 12.04

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

This article permanently updates the link address: Http://www.linuxidc.com/Linux/2014-05/102366.htm

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.