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