Install MySQL 5.6 database in Ubuntu

Source: Internet
Author: User
Install MySQL 5.6 database in Ubuntu 1) download:

Mysql-5.6.13-debian6.0-x86_64.deb

Http://dev.mysql.com/downloads/mirror.php? Id = 413956

2) installation:

$ sudo dpkg -i mysql-5.6.3-debian6.0-x86_64.deb


MySQL server is initialized at:/opt/MySQL/Server-5.63). Configuration:

$ Sudo groupadd MySQL $ sudo useradd-r-g MySQL $ sudo apt-Get install libaio-dev # I don't know how to use this $ sudo ln-S/opt/MySQL/Server- 5.6/usr/local/MySQL $ sudo mkdir/usr/local/MySQL/Data $ sudo chown-r MySQL. /usr/local/MySQL/Data
# Initialize the database $ sudo/usr/local/MySQL/scripts/mysql_install_db -- user = MySQL -- basedir =/usr/local/MySQL -- datadir =/usr/local/MySQL/data # put the startup shell of mysqld in the system service directory: $ sudo CP/usr/local/MySQL/support-files/MySQL. server/etc/init. d/MySQL # Put the MySQL configuration file under the System Configuration/etc/. MySQL uses this configuration file globally: $ sudo CP/usr/local/MySQL/support-files/my-default.cnf/etc/My. CNF

4) start/stop MySQL

$ sudo /etc/init.d/mysql start$ sudo /etc/init.d/mysql stop
5) change the MySQL root administrator password to ABC. We strongly recommend that you develop the Machine Password: Root
$ sudo /usr/local/mysql/bin/mysqladmin -u root password abc

6) log on to MySQL (after startup)

$ Sudo/usr/local/MySQL/bin/MySQL-u root-P <Database Name> # Or $ sudo/usr/local/MySQL/bin/MySQL-u root # display database> show databases; # Use Database> Use Database Name;> show all tables> show tables; # export to File> tee/home/sqlc.txt # windows:> Tee "C: /temp/sqlc.txt "# the subsequent SQL statement output is redirected to the file: sqlc.txt> show CREATE TABLE mytest;> select * From mytest; # exit MySQL Console> exit; # remotely log on to MySQL. username: Root, password: 123456 Remote Server IP: 192.168.1.88 service protocol port: 3306 remote database name: testdb $ mysql-u root-p123456-H 192.168.1.88-P 3306-D testdb

The following program is executed on Windows:

C: \ Program Files \ mysql server 5.5 \ bin \ mysql.exe

Reference:

Http://www.360doc.com/content/12/0919/18/8006573_237073873.shtml


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.