"9-2" MySQL database installation

Source: Internet
Author: User

MySQL Installation
    • Download the community version of the MySQL package (address), or Windows Installer
    • To the target path by compressing the installation package
    • Adding a target path to the system variable path
    • Under the MySQL installation path, modify the configuration file Mysql-default.ini:

Basedir = C:\mysql\mysql (mysql directory)

DataDir = C:\mysql\mysql\data (mysql directory \data)

    • Start cmd as an administrator, run the installation: Mysqld-install
    • Start mysql:net start MySQL
    • Login Mysql:mysql-u Root-p
    • Change Password:mysql> update mysql.user set Password=password (' 123 ') where user= ' root ';
    • Mysql> Flush Privileges
Table Operations
    • Creating a CREATE TABLE [schema name].tablename (column_name data type default value, ...);

    • Delete tables: DROP TABLE table_name;
    • Rename table name: ALTER TABLE table_name rename to New_table_name;
    • Add columns: ALTER TABLE tablename add ...;
    • Modify columns: ALTER TABLE tablename modify ...;
    • Delete column: ALTER TABLE tablename DROP column_name;
    • Rename column name: ALTER TABLE tablename change Old_column_name new_column_name

"9-2" MySQL database installation

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.