Ubuntu12.04assemble and configure mysql,tar.gz

Source: Internet
Author: User
Tags mysql download
Ubuntu installs and configures mysql and tar.gz to download mysql. In this process, it is necessary to say that there are too many mysql versions. I do not know the difference. Google ---- mysqldownload --- usually the first or second ---- then select MySQLCommunityServer or MySQLCommunityEdition (GPL) (This

Install and configure mysql in ubuntu 12.04 and download mysql in the form of mysqland tar.gz. In this process, it is necessary to mention that there are too many mysql versions, and I do not know the difference. Google ---- mysql download --- usually the first or second ---- then select MySQL Community Server or MySQL Community Edition (GPL) (This

Install and configure MySQL and tar.gz in ubuntu 12.04

When downloading mysql, it is necessary to say that there are too many mysql versions and I do not know the difference.
Google ---- mysql download --- usually the first or second ---- then select MySQL Community Server
Or MySQL Community Edition (GPL) (continue to select MySQL Community Server) ---- select the appropriate version:
I am a 64-bit system and choose:
Mysql-5.6.14-linux-glibc2.5-x86_64.tar.gz
(Often changed ):
Http://dev.mysql.com/downloads/mysql/
The command is as follows:
// Do not like sudo
# Su root
# Cp download/mysql-5.6.14-linux-glibc2.5-x86_64.tar.gz/usr/local/
# Groupadd mysql
# Useradd-g mysql
# Cd/usr/local
# Tar-zvxf mysql-5.6.14-linux-glibc2.5-x86_64.tar.gz
# Music mysql-5.6.14-linux-glibc2.5-x86_64 mysql
# Cd mysql
# Chown-R mysql.
# Chgrp-R mysql.
# Scripts/mysql_install_db -- user = mysql -- basedir =/usr/local/mysql
# Cd ..
# Chown-R root mysql.
# Cd mysql
# Chown-R mysql data
# Bin/mysqld_safe -- basedir =/usr/local/mysql -- user = mysql &
Bin/mysqld_safe -- basedir =/usr/local/mysql -- user = mysql & start mysql

So far, mysql is successfully installed and started

Add a password for the root user of mysql
Log on to mysql and execute:
# Cd user/local/mysql/bin
# Mysql-u root
Mysql> grant all privileges on *. * TO root @ localhost identified by "123456 ";

Start MySQL as a system service:
The operation below may be different.
For example, my machine will have a file called my-new.cnf, copy is actually this my-new.cnf, if there is no even
# Cp/user/local/my. cnf/etc/mysql/my. cnf
# Cp support-files/mysql. server/etc/init. d/mysql
Start mysql Service
#/Etc/init. d/mysql start
Restart mysql Service
#/Etc/init. d/mysql restart
Disable mysql Service
#/Etc/init. d/mysql stop


Mysql installation and configuration complete
How to Use service mysqld start | stop | restart in the next study

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.