MySQL Installation and configuration

Source: Internet
Author: User

MySQL Installation:

      1. at command-line input sudo apt- get install Mysql- server  
      2. A window will pop up during installation, enter the password for the database root user ( must enter password )      
      3. after installation through mysql - uroot - p and enter the password you entered earlier to enter the MySQL Data Environment     

To configure the encoding for MySQL:

    1. MySQL database encoding is latin1
    2. View database encoding: Show variables like '%char%'
    3. Ubuntu_server MYSQL Modified encoded file:/ETC/MYSQL/CONF.D/MYSQL.CNF
    4. Use the Vim editor to edit this file (mysql.cnf): (Paste the following code directly)
      [client] default - character - Set = UTF8 [mysqld] character - Set - = utf8collation - = Utf8_general_ci
    5. Restart server (must restart): service MySQL Restart      

To create a MySQL user:

  1. To create a user:
    Create User ' username '@ '%' by'password';
  2. Empowerment:
    Grant  All  on *. *  to ' username '@'%';
  3. Refresh: flush privileges;

Graphical operation of MySQL:

h eidisql is a free graphical software that operates on MySQL. : Https://www.heidisql.com/download.php?download=installer

    1. Remote connection MySQL or using a graphical tool connection you must modify MySQL The port inside the configuration file
    2. Files that are located Ubuntu-server MySQL under the Modify port /etc/mysql/mysql.conf.d mysqld.cnf
    3. Find bind-address this line, then 127.0.0.1 change it and 0.0.0.0 save it and exit.
    4. Then restart the service
    5. Create a MySQL normal user that can connect using a normal user. Remember to refresh

You can connect to the database remotely by completing the above necessary actions.

    

  

MySQL Installation and configuration

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.